newt - Clone current blinky with "newt new".
diff --git a/newt/cli/project_cmds.go b/newt/cli/project_cmds.go index 7bf03b7..abe7e3d 100644 --- a/newt/cli/project_cmds.go +++ b/newt/cli/project_cmds.go
@@ -27,6 +27,7 @@ "github.com/spf13/cobra" "mynewt.apache.org/newt/newt/downloader" "mynewt.apache.org/newt/newt/interfaces" + "mynewt.apache.org/newt/newt/newtutil" "mynewt.apache.org/newt/newt/project" "mynewt.apache.org/newt/util" ) @@ -52,7 +53,7 @@ dl.User = "apache" dl.Repo = "incubator-mynewt-blinky" - dir, err := dl.DownloadRepo("mynewt_0_8_0_b2_tag") + dir, err := dl.DownloadRepo(newtutil.NewtBlinkyTag) if err != nil { NewtUsage(cmd, err) }
diff --git a/newt/newt.go b/newt/newt.go index a39b80f..30105fa 100644 --- a/newt/newt.go +++ b/newt/newt.go
@@ -26,10 +26,10 @@ "github.com/spf13/cobra" "mynewt.apache.org/newt/newt/cli" + "mynewt.apache.org/newt/newt/newtutil" "mynewt.apache.org/newt/util" ) -var NewtVersionStr string = "Apache Newt (incubating) version: 0.9.0" var NewtLogLevel log.Level var newtSilent bool var newtQuiet bool @@ -103,7 +103,7 @@ Long: versHelpText, Example: versHelpEx, Run: func(cmd *cobra.Command, args []string) { - fmt.Printf("%s\n", NewtVersionStr) + fmt.Printf("%s\n", newtutil.NewtVersionStr) }, }
diff --git a/newt/newtutil/newtutil.go b/newt/newtutil/newtutil.go index 4fee488..0daa992 100644 --- a/newt/newtutil/newtutil.go +++ b/newt/newtutil/newtutil.go
@@ -29,6 +29,9 @@ "mynewt.apache.org/newt/viper" ) +var NewtVersionStr string = "Apache Newt (incubating) version: 0.9.0" +var NewtBlinkyTag string = "mynewt_0_9_0_tag" + func GetStringFeatures(v *viper.Viper, features map[string]bool, key string) string { val := v.GetString(key)