Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 2f526c49ca | |||
| 0374068bb7 | |||
| 46c7e3daf2 | |||
| dcc662daf7 |
+19
-2
@@ -13,9 +13,22 @@ echo "Current version: $current"
|
||||
|
||||
IFS='.' read -r major minor patch <<< "$current"
|
||||
|
||||
if [ "${1:-}" = "--increment" ]; then
|
||||
patch=$((patch + 1))
|
||||
new_version="${major}.${minor}.${patch}"
|
||||
echo "Auto-incrementing to: $new_version"
|
||||
else
|
||||
echo "Increment version? [y/N]"
|
||||
read -r answer
|
||||
if [[ "$answer" =~ ^[Yy] ]]; then
|
||||
patch=$((patch + 1))
|
||||
new_version="${major}.${minor}.${patch}"
|
||||
echo "New version: $new_version"
|
||||
else
|
||||
new_version="$current"
|
||||
echo "Keeping version: $new_version"
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "$new_version" > "$VERSION_FILE"
|
||||
|
||||
@@ -38,13 +51,16 @@ fi
|
||||
echo "Pushing to origin..."
|
||||
git push origin main
|
||||
|
||||
# --- Git tag ---
|
||||
# --- Git tag & Gitea release ---
|
||||
tag="v${new_version}"
|
||||
|
||||
if git tag -l "${tag}" | grep -q "^${tag}$"; then
|
||||
echo "Warning: Tag ${tag} already exists, skipping tag, push, and release creation."
|
||||
else
|
||||
echo "Creating tag ${tag}..."
|
||||
git tag -a "${tag}" -m "Release ${tag}"
|
||||
git push origin "${tag}"
|
||||
|
||||
# --- Gitea release ---
|
||||
echo ""
|
||||
echo "Creating Gitea release..."
|
||||
|
||||
@@ -64,3 +80,4 @@ tea release create \
|
||||
|
||||
echo ""
|
||||
echo "Done! Published arrman ${tag}"
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user