summaryrefslogtreecommitdiffstats
path: root/tools/build_snapshots.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tools/build_snapshots.sh')
-rwxr-xr-xtools/build_snapshots.sh8
1 files changed, 7 insertions, 1 deletions
diff --git a/tools/build_snapshots.sh b/tools/build_snapshots.sh
index 1903e6e..50cb476 100755
--- a/tools/build_snapshots.sh
+++ b/tools/build_snapshots.sh
@@ -92,7 +92,13 @@ git_last_commit() {
[ -z "${NO_RESET}" ] \
&& git -C "${BUILDER_ROOT}" reset --hard >/dev/null 2>&1
git -C "${BUILDER_ROOT}" pull -q
- export CURRENT_COMMIT=$(git -C ${BUILDER_ROOT} log -1 --format='%H')
+ if [ -n "${POUDRIERE_SNAPSHOTS}" ]; then
+ local _remote_repo=$(${BUILDER_ROOT}/build.sh -V POUDRIERE_PORTS_GIT_URL)
+ local _remote_branch=$(${BUILDER_ROOT}/build.sh -V POUDRIERE_PORTS_GIT_BRANCH)
+ export CURRENT_COMMIT=$(git ls-remote ${_remote_repo} ${_remote_branch} | cut -f1)
+ else
+ export CURRENT_COMMIT=$(git -C ${BUILDER_ROOT} log -1 --format='%H')
+ fi
}
restart_build() {
OpenPOWER on IntegriCloud