Skip to content

Commit f10ec11

Browse files
authored
Merge pull request #38 from OWASP/release/trigger-v5-tag
Release/trigger v5 tag
2 parents b04e451 + b640aa9 commit f10ec11

2 files changed

Lines changed: 17 additions & 6 deletions

File tree

.github/workflows/main.yml

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,13 @@ on:
88
- '5.0/**'
99
- 'docker/**'
1010
- 'Makefile'
11+
- '.github/workflows/main.yml'
1112
pull_request:
1213
paths:
1314
- '5.0/**'
1415
- 'docker/**'
1516
- 'Makefile'
17+
- '.github/workflows/main.yml'
1618

1719
jobs:
1820
build:
@@ -53,7 +55,7 @@ jobs:
5355
run: |
5456
LATEST_TAG=$(curl -s https://api.github.com/repos/${{ github.repository }}/releases/latest | jq -r .tag_name)
5557
if [ -z "$LATEST_TAG" ] || [ "$LATEST_TAG" == "null" ]; then
56-
LATEST_TAG="v5.0.0"
58+
LATEST_TAG=""
5759
fi
5860
echo "LATEST_TAG=$LATEST_TAG" >> $GITHUB_ENV
5961
@@ -62,10 +64,19 @@ jobs:
6264
if: github.event_name == 'push'
6365
run: |
6466
LATEST_TAG=${{ env.LATEST_TAG }}
65-
LATEST_VERSION=${LATEST_TAG#v}
66-
IFS='.' read -r major minor patch <<< "$LATEST_VERSION"
67-
NEW_VERSION="$major.$minor.$((patch + 1))"
68-
NEW_TAG="v$NEW_VERSION"
67+
68+
# TCASVS release line is anchored to ASVS-style v5.x tags.
69+
# Ignore legacy TASVS tags (for example v1.8.x) when deriving the next tag.
70+
if [[ "$LATEST_TAG" =~ ^v5\.([0-9]+)\.([0-9]+)$ ]]; then
71+
major=5
72+
minor=${BASH_REMATCH[1]}
73+
patch=${BASH_REMATCH[2]}
74+
NEW_VERSION="$major.$minor.$((patch + 1))"
75+
NEW_TAG="v$NEW_VERSION"
76+
else
77+
NEW_TAG="v5.0.0"
78+
fi
79+
6980
echo "NEW_TAG=$NEW_TAG" >> $GITHUB_ENV
7081
7182
- name: Create GitHub Release

index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,6 @@ The OWASP TCASVS would like to thank all of our [contributors](https://github.co
5454
</a>
5555
</p>
5656

57-
**Bentley is the leading provider of infrastructure engineering software, advancing infrastructure for better quality of life and sustainability.**
57+
**Bentley Systems is the leading provider of infrastructure engineering software, advancing infrastructure for better quality of life and sustainability.**
5858

5959
Visit [bentley.com](https://www.bentley.com/company/about-us/) to learn more.

0 commit comments

Comments
 (0)