diff --git a/build b/build index e8c2943..46614fa 100755 --- a/build +++ b/build @@ -1,6 +1,6 @@ #!/bin/sh -VERSION=0.5.0 +VERSION=0.6.0 docker build -t natpass -f contrib/build/Dockerfile . docker run --rm \ diff --git a/build_all b/build_all index 54f9015..acd5a72 100755 --- a/build_all +++ b/build_all @@ -1,8 +1,11 @@ #!/bin/sh +VERSION=0.6.0 + docker build -t natpass -f contrib/build/Dockerfile . docker run --rm \ -v `pwd`:/build \ -v $HOME/.cache/go-build:/root/.cache/go-build \ -v $HOME/go/pkg/mod:/root/go/pkg/mod \ + -e BUILD_VERSION=$VERSION \ natpass go run /build/contrib/build/build_all.go \ No newline at end of file diff --git a/contrib/build/build_all.go b/contrib/build/build_all.go index 2a9d379..3888518 100644 --- a/contrib/build/build_all.go +++ b/contrib/build/build_all.go @@ -19,7 +19,8 @@ import ( "github.com/lwch/runtime" ) -const version = "0.5.0" +var version = "0.0.0" + const buildDir = "tmp" const releaseDir = "release" @@ -94,6 +95,10 @@ var targets = []target{ } func main() { + if v, ok := os.LookupEnv("BUILD_VERSION"); ok { + version = v + } + logging.Info("go env...") cmd := exec.Command("go", "env") cmd.Stdout = os.Stdout