2017-05-18 23:51:52 +02:00
|
|
|
// Licensed to Pulumi Corporation ("Pulumi") under one or more
|
|
|
|
// contributor license agreements. See the NOTICE file distributed with
|
|
|
|
// this work for additional information regarding copyright ownership.
|
|
|
|
// Pulumi licenses this file to You under the Apache License, Version 2.0
|
|
|
|
// (the "License"); you may not use this file except in compliance with
|
|
|
|
// the License. You may obtain a copy of the License at
|
|
|
|
//
|
|
|
|
// http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
//
|
|
|
|
// Unless required by applicable law or agreed to in writing, software
|
|
|
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
// See the License for the specific language governing permissions and
|
|
|
|
// limitations under the License.
|
2016-11-20 01:44:25 +01:00
|
|
|
|
2017-04-12 19:38:12 +02:00
|
|
|
package main
|
2016-11-20 01:44:25 +01:00
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/spf13/cobra"
|
|
|
|
|
2017-05-18 20:38:28 +02:00
|
|
|
"github.com/pulumi/lumi/pkg/util/cmdutil"
|
|
|
|
"github.com/pulumi/lumi/pkg/util/contract"
|
2016-11-20 01:44:25 +01:00
|
|
|
)
|
|
|
|
|
2017-03-09 16:43:28 +01:00
|
|
|
func newPackGetCmd() *cobra.Command {
|
2016-11-20 01:44:25 +01:00
|
|
|
var global bool
|
|
|
|
var save bool
|
|
|
|
var cmd = &cobra.Command{
|
|
|
|
Use: "get [deps]",
|
2017-03-09 16:43:28 +01:00
|
|
|
Short: "Download a package",
|
|
|
|
Long: "Get downloads a package by name. If run without arguments, get will attempt\n" +
|
|
|
|
"to download dependencies referenced by the current package. Otherwise, if one\n" +
|
2016-11-20 01:44:25 +01:00
|
|
|
"or more specific dependencies are provided, only those will be downloaded.",
|
2017-04-12 20:12:25 +02:00
|
|
|
Run: cmdutil.RunFunc(func(cmd *cobra.Command, args []string) error {
|
Begin merging MuPackage/MuIL into the compiler
This is the first change of many to merge the MuPack/MuIL formats
into the heart of the "compiler".
In fact, the entire meaning of the compiler has changed, from
something that took metadata and produced CloudFormation, into
something that takes MuPack/MuIL as input, and produces a MuGL
graph as output. Although this process is distinctly different,
there are several aspects we can reuse, like workspace management,
dependency resolution, and some amount of name binding and symbol
resolution, just as a few examples.
An overview of the compilation process is available as a comment
inside of the compiler.Compile function, although it is currently
unimplemented.
The relationship between Workspace and Compiler has been semi-
inverted, such that all Compiler instances require a Workspace
object. This is more natural anyway and moves some of the detection
logic "outside" of the Compiler. Similarly, Options has moved to
a top-level package, so that Workspace and Compiler may share
access to it without causing package import cycles.
Finally, all that templating crap is gone. This alone is cause
for mass celebration!
2017-01-18 02:04:15 +01:00
|
|
|
contract.Failf("Get command is not yet implemented")
|
2017-03-07 14:47:42 +01:00
|
|
|
return nil
|
|
|
|
}),
|
2016-11-20 01:44:25 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
cmd.PersistentFlags().BoolVarP(
|
|
|
|
&global, "global", "g", false,
|
|
|
|
"Install to a shared location on this machine")
|
|
|
|
cmd.PersistentFlags().BoolVarP(
|
|
|
|
&save, "save", "s", false,
|
2017-03-09 16:43:28 +01:00
|
|
|
"Save new dependencies in the current package")
|
2016-11-20 01:44:25 +01:00
|
|
|
|
|
|
|
return cmd
|
|
|
|
}
|