]> git.apps.os.sepia.ceph.com Git - ceph-build.git/commitdiff
ceph-dev-setup: parse the value of GIT_COMMIT and make an artifact
authorAndrew Schoen <aschoen@redhat.com>
Thu, 1 Sep 2016 21:03:39 +0000 (16:03 -0500)
committerAndrew Schoen <aschoen@redhat.com>
Thu, 1 Sep 2016 21:09:16 +0000 (16:09 -0500)
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 <aschoen@redhat.com>
ceph-dev-setup/build/build

index fdaa31a98bcdc1176da192ff30e7f2b2805c609b..307f0f88c3daf642d471f939c220b8af2e73b253 100644 (file)
@@ -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