summaryrefslogtreecommitdiffstats
path: root/tools/build_snapshots.sh
diff options
context:
space:
mode:
authorRenato Botelho <renato@netgate.com>2015-11-25 11:59:10 -0200
committerRenato Botelho <renato@netgate.com>2015-11-25 12:00:28 -0200
commit1076fc7af00190125d858f823e3e1778dd948893 (patch)
tree46396f50a45e1031322cc31088f96ebe353de89e /tools/build_snapshots.sh
parent7f330caa6545b1a0e2ac2cea97992295bdfc1d97 (diff)
downloadpfsense-1076fc7af00190125d858f823e3e1778dd948893.zip
pfsense-1076fc7af00190125d858f823e3e1778dd948893.tar.gz
Check for new commits on ports tree
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