Skip to content

Commit 52bb40d

Browse files
committed
filter tags before taking the right one for all release pipelines
1 parent abe369f commit 52bb40d

File tree

4 files changed

+4
-7
lines changed

4 files changed

+4
-7
lines changed

.github/workflows/base-release.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,8 @@ jobs:
8181
if: inputs.nightly != 'true'
8282
# find previous tag by filtering out nightly tags and choosing the
8383
# second to last tag (last one is the current release)
84-
# TODO fix this filter to only filter builder tags
8584
run: |
86-
prev_tag=$(git tag | grep -v "nightly" | sort -r --version-sort | head -n 2 | tail -n 1)
85+
prev_tag=$(git tag | grep -v "cmd" | grep -v "nightly" | sort -r --version-sort | head -n 2 | tail -n 1)
8786
echo "PREVIOUS_RELEASE_TAG=$prev_tag" >> "$GITHUB_OUTPUT"
8887
8988
- name: Set nightly enabled

.github/workflows/nightly-release.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
# A previous release was created using a lightweight tag
3535
# git describe by default includes only annotated tags
3636
# git describe --tags includes lightweight tags as well
37-
DESCRIBE=`git tag -l --sort=-v:refname | grep -v nightly | head -n 1`
37+
DESCRIBE=`git tag -l --sort=-v:refname | grep -v cmd | grep -v nightly | head -n 1`
3838
MAJOR_VERSION=`echo $DESCRIBE | awk '{split($0,a,"."); print a[1]}'`
3939
MINOR_VERSION=`echo $DESCRIBE | awk '{split($0,a,"."); print a[2]}'`
4040
MINOR_VERSION="$((${MINOR_VERSION} + 1))"

.github/workflows/release-builder.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,8 @@ jobs:
2828
if: ${{ !contains(github.ref, '-nightly') }}
2929
# find previous tag by filtering out nightly tags and choosing the
3030
# second to last tag (last one is the current release)
31-
# TODO fix this filter to only filter builder tags
3231
run: |
33-
prev_tag=$(git tag | grep -v "nightly" | sort -r --version-sort | head -n 2 | tail -n 1)
32+
prev_tag=$(git tag | grep "cmd/builder" | grep -v "nightly" | sort -r --version-sort | head -n 2 | tail -n 1)
3433
echo "PREVIOUS_RELEASE_TAG=$prev_tag" >> "$GITHUB_OUTPUT"
3534
3635
- name: Set nightly enabled

.github/workflows/release-opampsupervisor.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,8 @@ jobs:
2828
if: ${{ !contains(github.ref, '-nightly') }}
2929
# find previous tag by filtering out nightly tags and choosing the
3030
# second to last tag (last one is the current release)
31-
# TODO fix this filter to only filter builder tags
3231
run: |
33-
prev_tag=$(git tag | grep -v "nightly" | sort -r --version-sort | head -n 2 | tail -n 1)
32+
prev_tag=$(git tag | grep "cmd/opampsupervisor" | grep -v "nightly" | sort -r --version-sort | head -n 2 | tail -n 1)
3433
echo "PREVIOUS_RELEASE_TAG=$prev_tag" >> "$GITHUB_OUTPUT"
3534
3635
- name: Set nightly enabled

0 commit comments

Comments
 (0)