#!/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