Skip to content

Commit

Permalink
Include build number in product version (#1108)
Browse files Browse the repository at this point in the history
  • Loading branch information
jzt authored Nov 22, 2017
1 parent b7ce51d commit 3693bd4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
7 changes: 4 additions & 3 deletions installer/build/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# exit on failure and configure debug, include util functions
set -eu -o pipefail +h

DRONE_BUILD_NUMBER=${DRONE_BUILD_NUMBER:-}
DRONE_BUILD_NUMBER=${DRONE_BUILD_NUMBER:-0}
export BUILD_NUMBER=${DRONE_BUILD_NUMBER:-}
ADMIRAL=""
VICENGINE=""
Expand Down Expand Up @@ -66,8 +66,9 @@ function cleanup() {

trap cleanup EXIT

GIT_TAG="$(git describe --tags)"
export BUILD_OVA_REVISION=${GIT_TAG}
TAG=$(git for-each-ref --format="%(refname:short)" --sort=-authordate --count=1 refs/tags) # e.g. `v0.9.0`
REV=$(git rev-parse --short=8 HEAD)
export BUILD_OVA_REVISION="$TAG-$DRONE_BUILD_NUMBER-$REV"
export BUILD_DCHPHOTON_VERSION="1.13"

[ $# -gt 0 ] || usage
Expand Down
1 change: 1 addition & 0 deletions installer/ovatools/rpctool/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ func init() {

func main() {
if version.Show() {
// #nosec - ignore unhandled error
fmt.Fprintf(os.Stdout, "%s\n", version.String())
return
}
Expand Down

0 comments on commit 3693bd4

Please sign in to comment.