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/02/03 19:30:39 UTC

[mynewt-newt] branch master updated (9db4d91 -> d259c39)

This is an automated email from the ASF dual-hosted git repository.

ccollins pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-newt.git.


    from 9db4d91  Fix downloading repo dependencies
     new b558e21  `newt version`: Print all details on one line
     new d259c39  `newt info`: Include newt version at top of output

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 newt/cli/project_cmds.go  | 2 ++
 newt/newt.go              | 6 +-----
 newt/newtutil/newtutil.go | 5 +++++
 3 files changed, 8 insertions(+), 5 deletions(-)


[mynewt-newt] 02/02: `newt info`: Include newt version at top of output

Posted by cc...@apache.org.
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

commit d259c398fae3fd8f49fe24102d2ac6b18fa15ad7
Author: Christopher Collins <cc...@apache.org>
AuthorDate: Mon Jan 27 10:34:49 2020 -0800

    `newt info`: Include newt version at top of output
    
    The `newt info` command displays information about each repo in the
    user's project.  Including the newt version makes the output more useful
    when a user reports an issue.
---
 newt/cli/project_cmds.go | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/newt/cli/project_cmds.go b/newt/cli/project_cmds.go
index 1dae11a..087a9fc 100644
--- a/newt/cli/project_cmds.go
+++ b/newt/cli/project_cmds.go
@@ -127,6 +127,8 @@ func upgradeRunCmd(cmd *cobra.Command, args []string) {
 }
 
 func infoRunCmd(cmd *cobra.Command, args []string) {
+	newtutil.PrintNewtVersion()
+
 	proj := TryGetProject()
 
 	// If no arguments specified, print status of all installed repos.


[mynewt-newt] 01/02: `newt version`: Print all details on one line

Posted by cc...@apache.org.
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

commit b558e21a7f49b893aca1edfc7f0c2a84f686936f
Author: Christopher Collins <cc...@apache.org>
AuthorDate: Mon Jan 27 10:33:36 2020 -0800

    `newt version`: Print all details on one line
    
    The `newt version` output was spread over three lines.  Putting all the
    output on a single line makes it easier for users to report their
    version number in slack or email.
---
 newt/newt.go              | 6 +-----
 newt/newtutil/newtutil.go | 5 +++++
 2 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/newt/newt.go b/newt/newt.go
index bffe29b..2c1fd6c 100644
--- a/newt/newt.go
+++ b/newt/newt.go
@@ -20,7 +20,6 @@
 package main
 
 import (
-	"fmt"
 	"os"
 	"runtime"
 
@@ -136,10 +135,7 @@ func newtCmd() *cobra.Command {
 		Long:    versHelpText,
 		Example: versHelpEx,
 		Run: func(cmd *cobra.Command, args []string) {
-			fmt.Printf("Apache Newt\n")
-			fmt.Printf("   Version: %s\n", newtutil.NewtVersionStr)
-			fmt.Printf("  Git Hash: %s\n", newtutil.NewtGitHash)
-			fmt.Printf("Build Date: %s\n", newtutil.NewtDate)
+			newtutil.PrintNewtVersion()
 		},
 	}
 
diff --git a/newt/newtutil/newtutil.go b/newt/newtutil/newtutil.go
index 7037338..7dcd91c 100644
--- a/newt/newtutil/newtutil.go
+++ b/newt/newtutil/newtutil.go
@@ -185,3 +185,8 @@ func ProjRelPath(path string) string {
 	proj := interfaces.GetProject()
 	return strings.TrimPrefix(path, proj.Path()+"/")
 }
+
+func PrintNewtVersion() {
+	util.StatusMessage(util.VERBOSITY_DEFAULT, "Apache Newt %s / %s / %s\n",
+		NewtVersionStr, NewtGitHash, NewtDate)
+}