Skip to content

Commit 7f5b62a

Browse files
Adding tag script
1 parent 6467c6d commit 7f5b62a

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

scripts/tag.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Get the latest tag reachable from the previous commit
2+
TAG=$(git describe --tags --abbrev=0 HEAD^ 2>/dev/null)
3+
4+
if [ -n "$TAG" ]; then
5+
sed -i "s/public const VERSION = .*/public const VERSION = '$TAG';/" src/Application.php
6+
git add src/Application.php
7+
echo "Version set to $TAG"
8+
else
9+
echo "No previous tag found."
10+
fi

0 commit comments

Comments
 (0)