From 1096fa3f87efffcbdf360d7d5003362a0bce8417 Mon Sep 17 00:00:00 2001 From: anon8675309 Date: Sat, 19 Jun 2021 15:01:17 -0500 Subject: [PATCH 1/6] Attempting to build the lastest tag instead of a hard-coded one --- .gitlab-ci.yml | 2 +- utils/do_debian_package.sh | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 95eb8f483..f5de71b8b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -10,7 +10,7 @@ deb: tags: - docker script: - - yes "" | ./utils/do_debian_package.sh --snapshot=stable --branch=1.36.1 --type=binary --interactive=no --dput=no --debbuild-extra=--no-sign || true + - yes "" | ./utils/do_debian_package.sh --snapshot=stable --type=binary --interactive=no --dput=no --debbuild-extra=--no-sign || true artifacts: paths: - '*.deb' diff --git a/utils/do_debian_package.sh b/utils/do_debian_package.sh index fe41365f7..d8a8d531c 100755 --- a/utils/do_debian_package.sh +++ b/utils/do_debian_package.sh @@ -118,8 +118,11 @@ else fi; if [ "$SNAPSHOT" == "stable" ]; then if [ "$BRANCH" == "" ]; then - #REV=$(git rev-list --tags --max-count=1) + 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)`; + echo "BRANCH = $BRANCH" if [ "$BRANCH" == "" ]; then echo "Unable to determine latest stable branch!" exit 0; From 1e834f6088157e1523fc8a3e6e5a4625eaa7e8d8 Mon Sep 17 00:00:00 2001 From: anon8675309 Date: Sat, 19 Jun 2021 16:03:13 -0500 Subject: [PATCH 2/6] Attempting to build the lastest tag instead of a hard-coded one --- utils/do_debian_package.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/utils/do_debian_package.sh b/utils/do_debian_package.sh index d8a8d531c..1e11dcc77 100755 --- a/utils/do_debian_package.sh +++ b/utils/do_debian_package.sh @@ -118,6 +118,8 @@ else fi; if [ "$SNAPSHOT" == "stable" ]; then if [ "$BRANCH" == "" ]; then + echo "About to run some basic commands for debugging..." + pwd; ls; git remote -v; git branch -v echo "About to get the hash of the most recent tag" REV=$(git rev-list --tags --max-count=1) echo "REV = $REV" From 479385bac7183854626579ed8af1cb04b3856e52 Mon Sep 17 00:00:00 2001 From: anon8675309 Date: Sat, 19 Jun 2021 17:49:23 -0500 Subject: [PATCH 3/6] Attempting to build the lastest tag instead of a hard-coded one --- utils/do_debian_package.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/do_debian_package.sh b/utils/do_debian_package.sh index 1e11dcc77..43040f35d 100755 --- a/utils/do_debian_package.sh +++ b/utils/do_debian_package.sh @@ -119,7 +119,7 @@ else if [ "$SNAPSHOT" == "stable" ]; then if [ "$BRANCH" == "" ]; then echo "About to run some basic commands for debugging..." - pwd; ls; git remote -v; git branch -v + pwd; ls; git remote -v; git branch -v; 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" From f852f1716ed1654c17cd3013d48fe52c7156c40d Mon Sep 17 00:00:00 2001 From: anon8675309 Date: Sat, 19 Jun 2021 18:11:57 -0500 Subject: [PATCH 4/6] Attempting to build the lastest tag instead of a hard-coded one --- utils/do_debian_package.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/utils/do_debian_package.sh b/utils/do_debian_package.sh index 43040f35d..a45afb6e1 100755 --- a/utils/do_debian_package.sh +++ b/utils/do_debian_package.sh @@ -119,12 +119,16 @@ else if [ "$SNAPSHOT" == "stable" ]; then if [ "$BRANCH" == "" ]; then echo "About to run some basic commands for debugging..." - pwd; ls; git remote -v; git branch -v; git tag -l + 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)`; echo "BRANCH = $BRANCH" + BRANCH=`git tag -l | sort | grep -v '^v.*' | tail -n 1` + echo "BRANCH = $BRANCH" if [ "$BRANCH" == "" ]; then echo "Unable to determine latest stable branch!" exit 0; From d927db1c0d00a5ba57c6db767d35292a1e53c24b Mon Sep 17 00:00:00 2001 From: anon8675309 Date: Sun, 20 Jun 2021 20:42:43 -0500 Subject: [PATCH 5/6] Attempting to build the lastest tag instead of a hard-coded one --- utils/do_debian_package.sh | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/utils/do_debian_package.sh b/utils/do_debian_package.sh index a45afb6e1..900043522 100755 --- a/utils/do_debian_package.sh +++ b/utils/do_debian_package.sh @@ -118,16 +118,12 @@ else fi; if [ "$SNAPSHOT" == "stable" ]; then if [ "$BRANCH" == "" ]; then - echo "About to run some basic commands for debugging..." - 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" + #REV=$(git rev-list --tags --max-count=1) BRANCH=`git describe --tags $(git rev-list --tags --max-count=1)`; - echo "BRANCH = $BRANCH" - BRANCH=`git tag -l | sort | grep -v '^v.*' | tail -n 1` + if [ -z "$BRANCH" ]; then + # 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" if [ "$BRANCH" == "" ]; then echo "Unable to determine latest stable branch!" From c0875838af9ccec534405c2e3006bd1d72581981 Mon Sep 17 00:00:00 2001 From: anon8675309 Date: Sun, 20 Jun 2021 21:11:06 -0500 Subject: [PATCH 6/6] Attempting to build the lastest tag instead of a hard-coded one --- utils/do_debian_package.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/do_debian_package.sh b/utils/do_debian_package.sh index 900043522..685b56bc0 100755 --- a/utils/do_debian_package.sh +++ b/utils/do_debian_package.sh @@ -123,8 +123,8 @@ else if [ -z "$BRANCH" ]; then # 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]*//'` + echo "Building branch $BRANCH" fi - echo "BRANCH = $BRANCH" if [ "$BRANCH" == "" ]; then echo "Unable to determine latest stable branch!" exit 0;