Merge pull request #1380 from justinsb/ci_use_git_version

Recognize CI=1 to makefile, use git sha for VERSION
This commit is contained in:
Zach Loafman 2017-01-09 10:57:15 -08:00 committed by GitHub
commit 1051a31fd1
1 changed files with 17 additions and 1 deletions

View File

@ -31,7 +31,23 @@ MAKEDIR:=$(strip $(shell dirname "$(realpath $(lastword $(MAKEFILE_LIST)))"))
# Keep in sync with upup/models/cloudup/resources/addons/dns-controller/
DNS_CONTROLLER_TAG=1.4.1
VERSION?=1.5.0-alpha1
ifndef VERSION
# To keep both CI and end-users building from source happy,
# we expect that CI sets CI=1.
#
# For end users, they need only build kops, and they can use the last
# released version of nodeup/protokube.
# For CI, we continue to build a synthetic version from the git SHA, so
# we never cross versions.
#
# We expect that if you are uploading nodeup/protokube, you will set
# VERSION (along with S3_BUCKET), either directly or by setting CI=1
ifndef CI
VERSION=1.5.0-alpha1
else
VERSION := git-$(shell git describe --always)
endif
endif
# Go exports: