From 1617cc44ec23b188ddc9f316063e1238c867eebc Mon Sep 17 00:00:00 2001 From: Luca Negrini Date: Mon, 5 Feb 2024 09:29:20 +0100 Subject: [PATCH] Update snapshot-branch.yml --- .github/workflows/snapshot-branch.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/snapshot-branch.yml b/.github/workflows/snapshot-branch.yml index 7dd27d917..bab5e3197 100644 --- a/.github/workflows/snapshot-branch.yml +++ b/.github/workflows/snapshot-branch.yml @@ -9,6 +9,10 @@ jobs: steps: - name: 'Checkout' uses: actions/checkout@v2 + with: + fetch-depth: 0 # needed to have the tags below + - name: 'Ensure git is installed' + run: sudo apt-get install -y git - name: 'Set up JDK 11' uses: actions/setup-java@v1 with: @@ -53,6 +57,12 @@ jobs: git tag --sort=-creatordate | head -n5 currenttag=$(git tag --sort=-creatordate | grep -v latest | grep "^v[0-9].*" | head -n1) echo "current tag: $currenttag" + function join_by { + local d=${1-} f=${2-} + if shift 2; then + printf %s "$f" "${@/#/$d}" + fi + } # tokenize whenever we transition from numbers to whatever else # 5.2b4 -> (5 . 2 b 4) currentver=${currenttag#?} # remove the v