generated from archlinux/template
Attempt to run every two minutes
This commit is contained in:
24
.gitea/workflows/bump-pkgrel.sh
Executable file
24
.gitea/workflows/bump-pkgrel.sh
Executable file
@@ -0,0 +1,24 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Run your check script
|
||||
.gitea/workflows/check-up-to-date.sh
|
||||
RETVAL=$?
|
||||
|
||||
if [ $RETVAL -eq 1 ]; then
|
||||
echo "Changes detected, bumping pkgrel..."
|
||||
|
||||
# Use sed to increment pkgrel in the PKGBUILD file
|
||||
sed -i -E 's/^(pkgrel=)([0-9]+)/echo "\1$((\2 + 1))"/e' PKGBUILD
|
||||
|
||||
# Get the new pkgrel value for the commit message
|
||||
NEW_PKGREL=$(grep ^pkgrel= PKGBUILD | cut -d= -f2)
|
||||
|
||||
# Add, commit, and push the change
|
||||
git add PKGBUILD
|
||||
git commit -m "Bump pkgrel to ${NEW_PKGREL}"
|
||||
git push
|
||||
|
||||
echo "pkgrel bumped to ${NEW_PKGREL} and changes pushed."
|
||||
else
|
||||
echo "No changes detected. Nothing to do."
|
||||
fi
|
||||
Reference in New Issue
Block a user