From a08861f0f24d1f4d3c4b22f92d7d536a68ecba85 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Sat, 12 Oct 2024 14:15:37 -0700 Subject: [PATCH] avoid version number issues with incorrect lightweight tags This happened (briefly) with v2.2.1. Signed-off-by: Dirk Hohndel --- release-notes.md | 5 ++--- .../adsb-feeder/filesystem/root/opt/adsb/feeder-update | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/release-notes.md b/release-notes.md index 55a317d8..6c7ff9f4 100644 --- a/release-notes.md +++ b/release-notes.md @@ -1,6 +1,5 @@ -Changes since v2.2.0 include: -- raspbian image build: don't disable bluetooth via config.txt as this somehow interacts badly with pi3 mlat -- fix a couple of typos +Changes since v2.2.1 include: +- ensure remote tags are always updated - this avoids odd version number issues > [!NOTE] > Based on the available usage information, I have significantly reduced the number of images provided here. If there's one that you need for a different SBC which is supported either by Armbian or DietPi, please post a request on the [Zulip server](https://adsblol.zulipchat.com/#narrow/stream/391168-adsb-feeder-image) diff --git a/src/modules/adsb-feeder/filesystem/root/opt/adsb/feeder-update b/src/modules/adsb-feeder/filesystem/root/opt/adsb/feeder-update index 7b464cf3..8e1ce42a 100755 --- a/src/modules/adsb-feeder/filesystem/root/opt/adsb/feeder-update +++ b/src/modules/adsb-feeder/filesystem/root/opt/adsb/feeder-update @@ -122,7 +122,7 @@ else mkdir -p /opt/adsb-feeder-update # make sure the git dir is up to date # don't hide the output as that could be useful in the logs - if ! cd /opt/adsb-feeder-update/adsb-feeder-image || ! git fetch; then + if ! cd /opt/adsb-feeder-update/adsb-feeder-image || ! git fetch --force --tags --prune --prune-tags ; then cd /opt/adsb-feeder-update || exit_with_message "can't cd /opt/adsb-feeder-update" rm -rf /opt/adsb-feeder-update/adsb-feeder-image git clone https://github.com/dirkhh/adsb-feeder-image || exit_with_message "git clone failed, giving up" @@ -186,7 +186,7 @@ cd "${DIR}/adsb-feeder-image" || exit_with_message "can't cd to ${DIR}/adsb-feed # grab the most recent version tag. Forcing '--long' always adds the --g trailer to the result - which we then can remove TAG_COMPONENT=$(git describe --match "v[0-9]*" --long | sed "s/-[0-9]*-g[0-9a-f]*//") -# now comare this to a regular call to git describe so we get the SHA that we'll add at the end +# now compare this to a regular call to git describe so we get the SHA that we'll add at the end DESCRIBE=$(git describe --match "v[0-9]*") SHA_COMPONENT=${DESCRIBE//$TAG_COMPONENT/} VERSION="${TAG_COMPONENT}(${BRANCH})${SHA_COMPONENT}"