You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using `--dont-test` one can now disable package-level tests. The effect
is the same as if one were to set `dontTest` on all packages. Using this
flag does not affect a packages version.
Copy file name to clipboardExpand all lines: cmd/build.go
+7Lines changed: 7 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -97,12 +97,18 @@ var buildCmd = &cobra.Command{
97
97
reporter=leeway.NewConsoleReporter()
98
98
}
99
99
100
+
dontTest, err:=cmd.Flags().GetBool("dont-test")
101
+
iferr!=nil {
102
+
log.Fatal(err)
103
+
}
104
+
100
105
err=leeway.Build(pkg,
101
106
leeway.WithLocalCache(localCache),
102
107
leeway.WithRemoteCache(remoteCache),
103
108
leeway.WithDryRun(dryrun),
104
109
leeway.WithBuildPlan(planOutlet),
105
110
leeway.WithReporter(reporter),
111
+
leeway.WithDontTest(dontTest),
106
112
)
107
113
iferr!=nil {
108
114
log.Fatal(err)
@@ -176,6 +182,7 @@ func init() {
176
182
buildCmd.Flags().String("save", "", "After a successful build this saves the build result as tar.gz file in the local filesystem (e.g. --save build-result.tar.gz)")
177
183
buildCmd.Flags().String("dump-plan", "", "Writes the build plan as JSON to a file. Use \"-\" to write the build plan to stderr.")
178
184
buildCmd.Flags().Bool("werft", false, "Produce werft CI compatible output")
185
+
buildCmd.Flags().Bool("dont-test", false, "Disable all package-level tests (defaults to false)")
0 commit comments