Propagate version info into salt config and use to build.

Fixes #1043.
This commit is contained in:
Joe Beda
2014-08-26 16:00:34 -07:00
parent 169e6f079a
commit 5722eba780
7 changed files with 27 additions and 5 deletions

View File

@@ -40,14 +40,27 @@ echo "Building release tree"
cp $KUBE_DIR/release/master-release-install.sh $MASTER_RELEASE_DIR/src/scripts/master-release-install.sh
cp -r $KUBE_DIR/cluster/saltbase $MASTER_RELEASE_DIR/src/saltbase
# Capture the same version we are using to build the client tools and pass that
# on.
version=$(
unset IFS
source $KUBE_DIR/hack/config-go.sh
gitcommit
)
cat << EOF > $MASTER_RELEASE_DIR/src/saltbase/pillar/common.sls
instance_prefix: $INSTANCE_PREFIX-minion
go_opt: -ldflags "-X github.com/GoogleCloudPlatform/kubernetes/pkg/version.commitFromGit '$version'"
EOF
function find_go_files() {
find * -not \( \
\( \
-wholename 'release' \
-o -wholename 'output' \
-o -wholename '_output' \
-o -wholename 'examples' \
-o -wholename 'test' \
\) -prune \
\) -name '*.go'
}