This commit is contained in:
@@ -27,7 +27,8 @@ jobs:
|
||||
cp -rp . /tmp/$MODULE
|
||||
rm -rf /tmp/$MODULE/.git \
|
||||
/tmp/$MODULE/.gitea \
|
||||
/tmp/$MODULE/CLAUDE.md
|
||||
/tmp/$MODULE/CLAUDE.md \
|
||||
/tmp/$MODULE/release.sh
|
||||
cd /tmp && zip -r ${MODULE}.zip $MODULE/
|
||||
mkdir -p $GITHUB_WORKSPACE/dist
|
||||
mv /tmp/${MODULE}.zip $GITHUB_WORKSPACE/dist/
|
||||
|
||||
@@ -30,7 +30,8 @@ jobs:
|
||||
cp -rp . /tmp/$MODULE
|
||||
rm -rf /tmp/$MODULE/.git \
|
||||
/tmp/$MODULE/.gitea \
|
||||
/tmp/$MODULE/CLAUDE.md
|
||||
/tmp/$MODULE/CLAUDE.md \
|
||||
/tmp/$MODULE/release.sh
|
||||
cd /tmp && zip -r ${MODULE}.zip $MODULE/
|
||||
mkdir -p $GITHUB_WORKSPACE/dist
|
||||
mv /tmp/${MODULE}.zip $GITHUB_WORKSPACE/dist/
|
||||
|
||||
Executable
+29
@@ -0,0 +1,29 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
FILE=simple_withdrawalbutton.php
|
||||
|
||||
# Read current version
|
||||
CURRENT=$(grep "version = '" "$FILE" | grep -o "'[0-9]*\.[0-9]*\.[0-9]*'" | tr -d "'")
|
||||
if [ -z "$CURRENT" ]; then
|
||||
echo "Error: could not read version from $FILE" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Increment patch
|
||||
MAJOR=$(echo "$CURRENT" | cut -d. -f1)
|
||||
MINOR=$(echo "$CURRENT" | cut -d. -f2)
|
||||
PATCH=$(echo "$CURRENT" | cut -d. -f3)
|
||||
NEW="$MAJOR.$MINOR.$((PATCH + 1))"
|
||||
|
||||
echo "Version: $CURRENT → $NEW"
|
||||
|
||||
# Write new version into module file
|
||||
sed -i "s/version = '$CURRENT'/version = '$NEW'/" "$FILE"
|
||||
|
||||
# Commit, tag, push — triggers release pipeline on Gitea
|
||||
git add "$FILE"
|
||||
git commit -m "Bump version to $NEW"
|
||||
git tag "v$NEW"
|
||||
git push
|
||||
git push origin "v$NEW"
|
||||
Reference in New Issue
Block a user