From 190c2d59ea34633b0e105d5a8bb545037a82ff52 Mon Sep 17 00:00:00 2001 From: Nik Ogura Date: Tue, 21 Dec 2021 13:24:24 -0800 Subject: [PATCH] remove default branch in favor of no default at all. --- cmd/root.go | 2 +- metadata.json | 2 +- pkg/gomason/golang_test.go | 8 ++++---- pkg/gomason/gomason.go | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/cmd/root.go b/cmd/root.go index 2f8b03b..3af6725 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -57,7 +57,7 @@ func Execute() { func init() { rootCmd.PersistentFlags().BoolVarP(&Verbose, "verbose", "v", false, "Verbose output") rootCmd.PersistentFlags().BoolVarP(&dryrun, "dryrun", "d", false, "Dry Run (Only applies to publish.") - rootCmd.PersistentFlags().StringVarP(&branch, "branch", "b", "master", "Branch to operate upon") + rootCmd.PersistentFlags().StringVarP(&branch, "branch", "b", "", "Branch to operate upon") rootCmd.PersistentFlags().StringVarP(&workdir, "workdir", "w", "", "Workdir. If omitted, a temp dir will be created and subsequently cleaned up.") rootCmd.PersistentFlags().StringVarP(&buildSkipTargets, "skip-build-targets", "", "", fmt.Sprintf("Comma separated list of build targets from %s to skip.", gomason.METADATA_FILENAME)) rootCmd.PersistentFlags().StringVarP(&testTimeout, "test-timeout", "", "", "timeout for tests to complete (must be valid time input for language)") diff --git a/metadata.json b/metadata.json index c714d85..15f3607 100644 --- a/metadata.json +++ b/metadata.json @@ -1,5 +1,5 @@ { - "version": "2.8.0", + "version": "2.10.0", "package": "github.com/nikogura/gomason", "description": "A tool for testing, building, signing, and publishing your project from a clean workspace.", "repository": "http://localhost:8081/artifactory/generic-local", diff --git a/pkg/gomason/golang_test.go b/pkg/gomason/golang_test.go index 4673574..c237d75 100644 --- a/pkg/gomason/golang_test.go +++ b/pkg/gomason/golang_test.go @@ -39,7 +39,7 @@ func TestCheckoutDefault(t *testing.T) { } log.Printf("Checking out Master Branch") - err = lang.Checkout(gopath, testMetadataObj(), "master") + err = lang.Checkout(gopath, testMetadataObj(), "") if err != nil { log.Printf("Failed to checkout module: %s", err) t.FailNow() @@ -91,7 +91,7 @@ func TestPrep(t *testing.T) { t.FailNow() } - err = lang.Checkout(gopath, testMetadataObj(), "master") + err = lang.Checkout(gopath, testMetadataObj(), "") if err != nil { log.Printf("Failed to checkout module: %s", err) t.FailNow() @@ -181,7 +181,7 @@ func TestBuild(t *testing.T) { log.Printf("Checking out Master Branch") - err = lang.Checkout(gopath, testMetadataObj(), "master") + err = lang.Checkout(gopath, testMetadataObj(), "") if err != nil { log.Printf("Failed to checkout module: %s", err) t.FailNow() @@ -246,7 +246,7 @@ func TestTest(t *testing.T) { t.FailNow() } - err = lang.Checkout(gopath, testMetadataObj(), "master") + err = lang.Checkout(gopath, testMetadataObj(), "") if err != nil { log.Printf("Failed to checkout module: %s", err) t.FailNow() diff --git a/pkg/gomason/gomason.go b/pkg/gomason/gomason.go index 52a0542..97a1061 100644 --- a/pkg/gomason/gomason.go +++ b/pkg/gomason/gomason.go @@ -15,7 +15,7 @@ import ( ) // VERSION is the current gomason version -const VERSION = "2.9.0" +const VERSION = "2.10.0" // METADATA_FILENAME The default gomason metadata file name const METADATA_FILENAME = "metadata.json"