File tree Expand file tree Collapse file tree 1 file changed +27
-0
lines changed
Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ # Prompt for the new version
4+ read -p " Enter new version (e.g. 1.1.0): " VERSION
5+
6+ # Validate version format: must be X.Y.Z
7+ if [[ ! " $VERSION " =~ ^[0-9]+\. [0-9]+\. [0-9]+$ ]]; then
8+ echo " ❌ Invalid version format. Use semantic versioning: X.Y.Z (e.g. 1.2.3)"
9+ exit 1
10+ fi
11+
12+ TAG=" v$VERSION "
13+
14+ # Update version in readme.txt
15+ sed -i ' ' " s/^Stable tag: .*/Stable tag: $VERSION /" readme.txt
16+
17+ # Update version in main plugin file
18+ sed -i ' ' " s/^\(\*\s*Version:\s*\).*/\1$VERSION /" webhookarm.php
19+
20+ # Git add and commit
21+ git add readme.txt webhookarm.php
22+ git commit -m " 🔖 Bump version to $VERSION "
23+ git push origin main
24+
25+ echo " ✅ Version updated to $VERSION and pushed to main."
26+ echo " ⏳ Waiting for GitHub Action to auto-tag version $TAG ..."
27+ echo " 👉 Monitor progress at: https://github.com/renatobo/WebHookARM/actions"
You can’t perform that action at this time.
0 commit comments