mirror of https://github.com/perkeep/perkeep.git
misc/docker/dock.go: fail if tarball_version and build_image both set
Change-Id: I985cba6a8de0eb9f5e5e008ea0153d4a417991da
This commit is contained in:
parent
66f0ddac0e
commit
8888d4256f
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue