From: Andrew Schoen Date: Thu, 1 Sep 2016 21:03:39 +0000 (-0500) Subject: ceph-dev-setup: parse the value of GIT_COMMIT and make an artifact X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=db9f320e449ffeae268187bb4c44c3ba3b4bc829;p=ceph-build.git ceph-dev-setup: parse the value of GIT_COMMIT and make an artifact GIT_COMMIT will be in the format origin/$branch, so parse that and write it to an artifact so ceph-dev-build can consume it. Signed-off-by: Andrew Schoen --- diff --git a/ceph-dev-setup/build/build b/ceph-dev-setup/build/build index fdaa31a9..307f0f88 100644 --- a/ceph-dev-setup/build/build +++ b/ceph-dev-setup/build/build @@ -1,5 +1,7 @@ #!/bin/bash -ex +BRANCH=`echo $GIT_BRANCH | cut -d '/' -f 2` + HOST=$(hostname --short) echo "Building on ${HOST}" echo " DIST=${DIST}" @@ -191,3 +193,7 @@ mv release/version dist/. cat > dist/sha1 << EOF SHA1=${GIT_COMMIT} EOF + +cat > dist/branch << EOF +BRANCH=${BRANCH} +EOF