Attempting to build the lastest tag instead of a hard-coded one
This commit is contained in:
parent
a03b505324
commit
74641731bb
|
@ -118,16 +118,12 @@ else
|
||||||
fi;
|
fi;
|
||||||
if [ "$SNAPSHOT" == "stable" ]; then
|
if [ "$SNAPSHOT" == "stable" ]; then
|
||||||
if [ "$BRANCH" == "" ]; then
|
if [ "$BRANCH" == "" ]; then
|
||||||
echo "About to run some basic commands for debugging..."
|
#REV=$(git rev-list --tags --max-count=1)
|
||||||
pwd; ls; git remote -v; git branch -v; git status
|
|
||||||
echo "Listing all of the tags for this repo:"
|
|
||||||
git tag -l
|
|
||||||
echo "About to get the hash of the most recent tag"
|
|
||||||
REV=$(git rev-list --tags --max-count=1)
|
|
||||||
echo "REV = $REV"
|
|
||||||
BRANCH=`git describe --tags $(git rev-list --tags --max-count=1)`;
|
BRANCH=`git describe --tags $(git rev-list --tags --max-count=1)`;
|
||||||
echo "BRANCH = $BRANCH"
|
if [ -z "$BRANCH" ]; then
|
||||||
BRANCH=`git tag -l | sort | grep -v '^v.*' | tail -n 1`
|
# This should only happen in CI environments where tag info isn't available
|
||||||
|
BRANCH=`grep ' release$' distros/fedora/zoneminder.spec | head -n 1 | sed -e 's/ release//g' -e 's/[^0-9]*//'`
|
||||||
|
fi
|
||||||
echo "BRANCH = $BRANCH"
|
echo "BRANCH = $BRANCH"
|
||||||
if [ "$BRANCH" == "" ]; then
|
if [ "$BRANCH" == "" ]; then
|
||||||
echo "Unable to determine latest stable branch!"
|
echo "Unable to determine latest stable branch!"
|
||||||
|
|
Loading…
Reference in New Issue