Skip to content

Commit

Permalink
avoid version number issues with incorrect lightweight tags
Browse files Browse the repository at this point in the history
This happened (briefly) with v2.2.1.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
  • Loading branch information
dirkhh committed Oct 12, 2024
1 parent 42def94 commit a08861f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
5 changes: 2 additions & 3 deletions release-notes.md
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand 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 -<num>-g<sha> 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}"
Expand Down

0 comments on commit a08861f

Please sign in to comment.