You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by cc...@apache.org on 2020/03/18 17:22:51 UTC
[mynewt-newt] branch master updated: newt new: Infer latest "rc"
tag for blinky
This is an automated email from the ASF dual-hosted git repository.
ccollins pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-newt.git
The following commit(s) were added to refs/heads/master by this push:
new e73b109 newt new: Infer latest "rc" tag for blinky
e73b109 is described below
commit e73b109c22f057ea8ac0db4cdafaf12531ae66d5
Author: Christopher Collins <cc...@apache.org>
AuthorDate: Wed Mar 18 09:38:43 2020 -0700
newt new: Infer latest "rc" tag for blinky
To prevent code churn during the release process, newt infers the latest
"rc" tag when updating a Mynewt repo (rather than forcing the maintainer
to update the non-rc tag each time a new release candidate is created).
This tag inference feature was applied to repos during `newt upgrade`.
It was not applied to the blinky repo during `newt new`.'
This commit adds tag inference to `newt new`.
---
newt/cli/project_cmds.go | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/newt/cli/project_cmds.go b/newt/cli/project_cmds.go
index 68bfbef..290a04c 100644
--- a/newt/cli/project_cmds.go
+++ b/newt/cli/project_cmds.go
@@ -60,12 +60,22 @@ func newRunCmd(cmd *cobra.Command, args []string) {
}
defer os.RemoveAll(tmpdir)
- if err := dl.Clone(newtutil.NewtBlinkyTag, tmpdir); err != nil {
+ if err := dl.Clone("master", tmpdir); err != nil {
+ NewtUsage(nil, err)
+ }
+
+ commit, err := dl.LatestRc(tmpdir, newtutil.NewtBlinkyTag)
+ if err != nil {
+ NewtUsage(nil, err)
+ }
+
+ err = dl.Checkout(tmpdir, commit)
+ if err != nil {
NewtUsage(nil, err)
}
util.StatusMessage(util.VERBOSITY_DEFAULT, "Installing "+
- "skeleton in %s...\n", newDir)
+ "skeleton in %s (commit: %s)\n", newDir, commit)
if err := util.CopyDir(tmpdir, newDir); err != nil {
NewtUsage(cmd, err)