Skip to content

Commit 1690ce4

Browse files
committed
Fixed svg rule
1 parent 8018dd4 commit 1690ce4

1 file changed

Lines changed: 22 additions & 0 deletions

File tree

checkVersion.sh

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Script to check the version format to avoid typos and mistakes.
2+
# WIP: This script is not used in the workflow yet.
3+
4+
VERSION=$1
5+
6+
echo "Checking version format for version: $VERSION"
7+
8+
if [[ ! "$VERSION" =~ ^[0-9]+\.[0-9]+(\.[0-9]+)?(-SNAPSHOT)?$ ]]; then
9+
echo "Invalid version format: $VERSION"
10+
exit 1
11+
fi
12+
13+
echo "Version format is valid: $VERSION"VERSION=${{ github.event.inputs.version }}
14+
15+
echo "Checking version format for version: $VERSION"
16+
17+
if [[ ! "$VERSION" =~ ^[0-9]+\.[0-9]+(\.[0-9]+)?(-SNAPSHOT)?$ ]]; then
18+
echo "Invalid version format: $VERSION"
19+
exit 1
20+
fi
21+
22+
echo "Version format is valid: $VERSION"

0 commit comments

Comments
 (0)