summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2017-11-21 14:30:57 -0800
committerIvan Kohler <ivan@freeside.biz>2017-11-21 14:30:57 -0800
commit437042190fc83f5c2ed91386f44460d194278c84 (patch)
tree67107114a77f33cc1413532373c6de09afa838da
parent437281a2ec3c3cc209e8774019be883d3e7f21c4 (diff)
add hour to timestamp; don't build packages needlessly
-rwxr-xr-xbin/freeside-debian-releases.sh12
1 files changed, 11 insertions, 1 deletions
diff --git a/bin/freeside-debian-releases.sh b/bin/freeside-debian-releases.sh
index 84d4e92dc..13dbccea3 100755
--- a/bin/freeside-debian-releases.sh
+++ b/bin/freeside-debian-releases.sh
@@ -10,7 +10,7 @@ if [[ $# -ne 3 ]]
exit;
fi
-DATE=`date +"%Y%m%d"`
+DATE=`date +"%Y%m%d%H"`
DIR="/home/autobuild/packages/staging/freeside$FS_VERSION/$FS_REPO"
TARGET="/home/autobuild/public_html/freeside$FS_VERSION-$DISTRO-$FS_REPO"
@@ -28,6 +28,16 @@ rm -fr $DIR/freeside/debian/freeside-ng-selfservice.conffiles
# Pull any changes
cd $DIR/freeside
git checkout -- debian/changelog
+
+LOCAL=`git rev-parse FREESIDE_${FS_VERSION}_BRANCH`
+REMOTE=`git ls-remote origin -h refs/heads/FREESIDE_${FS_VERSION}_BRANCH | cut -f1`
+
+if [ $LOCAL = $REMOTE ]; then
+ echo "No new changes in git; aborting build."
+ exit #there's no new changes
+fi
+echo "New changes in git since last build; building new packages."
+
git pull
#STATUS=`git pull`