Skip to content

Commit 9402095

Browse files
committed
[chore](version check): Add a version check script
1 parent 7f74218 commit 9402095

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

docs/VERSION.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.0.0
1+
0.4.0

infra/scripts/version_check.sh

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,20 @@
22
#
33
# Check current version based on active develop branch name
44

5-
CURRENTVERSION="3.0.0"
5+
CURRENTVERSION=$(git tag | sort -r | tr '\n' ' ' | cut -d" " -f1)
6+
CURRENTVERSION=${CURRENTVERSION##*v}
7+
8+
echo "CURRENT VERSION: ${CURRENTVERSION}"
9+
10+
if [ -z "$CURRENTVERSION" ]
11+
then
12+
exit 1
13+
fi
614

715
VERSIONDOC=$(cat docs/VERSION.md)
816

917
if [ "$VERSIONDOC" == "$CURRENTVERSION" ]; then
10-
echo "Version checked: $VERSIONDOC"
18+
echo "Version checked (VERSION.md file): $VERSIONDOC"
1119
exit 0
1220
else
1321
echo "Package version in VERSION.md file does not seem correct!"

0 commit comments

Comments
 (0)