diff --git a/misc/docker/dock.go b/misc/docker/dock.go index 769d91224..16228818b 100644 --- a/misc/docker/dock.go +++ b/misc/docker/dock.go @@ -45,7 +45,7 @@ import ( var ( flagRev = flag.String("rev", "", "Camlistore revision to build (tag or commit hash). For development purposes, you can instead specify the path to a local Camlistore source tree from which to build, with the form \"WIP:/path/to/dir\".") - flagVersion = flag.String("tarball_version", "", "Version number (e.g. 0.9) used for the release tarball name. It also defines the destination directory where the release tarball is uploaded.") + flagVersion = flag.String("tarball_version", "", "For --build_image mode, the version number (e.g. 0.9) used for the release tarball name. It also defines the destination directory where the release tarball is uploaded.") buildOS = flag.String("os", runtime.GOOS, "Operating system to build for. Requires --build_release.") doImage = flag.Bool("build_image", true, "build the Camlistore server as a docker image. Conflicts with --build_release.") @@ -452,6 +452,10 @@ func checkFlags() { fmt.Fprintf(os.Stderr, "Usage error: --tarball_version required when building the release tarball.\n") usage() } + if *doImage && *flagVersion != "" { + fmt.Fprintf(os.Stderr, "Usage error: --tarball_version not applicable in --build_image mode.\n") + usage() + } if isWIP() { if _, err := os.Stat(localCamliSource()); err != nil { fmt.Fprintf(os.Stderr, "Usage error: could not stat path %q provided with --rev: %v", localCamliSource(), err)