From db9f320e449ffeae268187bb4c44c3ba3b4bc829 Mon Sep 17 00:00:00 2001 From: Andrew Schoen Date: Thu, 1 Sep 2016 16:03:39 -0500 Subject: [PATCH] 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 --- ceph-dev-setup/build/build | 6 ++++++ 1 file changed, 6 insertions(+) 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 -- 2.47.3