summaryrefslogtreecommitdiff
path: root/.forgejo/workflows
diff options
context:
space:
mode:
Diffstat (limited to '.forgejo/workflows')
-rw-r--r--.forgejo/workflows/kernel-update-check.yml13
1 files changed, 10 insertions, 3 deletions
diff --git a/.forgejo/workflows/kernel-update-check.yml b/.forgejo/workflows/kernel-update-check.yml
index 6f949c3..fb6210f 100644
--- a/.forgejo/workflows/kernel-update-check.yml
+++ b/.forgejo/workflows/kernel-update-check.yml
@@ -92,9 +92,16 @@ jobs:
OLD_PKGVER="${{ steps.current.outputs.PKGVER }}"
CUR="${{ steps.current.outputs.MAJOR }}.${{ steps.current.outputs.MINOR }}-${{ steps.current.outputs.TAGREL }}"
- # pkgver = kernel verzio (pl. 7.0.11), pkgrel mindig 20
+ # pkgver = kernel verzio (pl. 7.0.11), pkgrel auto-increment (min 10)
NEW_PKGVER="${NEW_MAJOR}.${NEW_MINOR}"
+ OLD_PKGREL=$(grep '^pkgrel=' linux-raveos/PKGBUILD | cut -d= -f2)
+ if [ "$OLD_PKGREL" -lt 10 ]; then
+ NEW_PKGREL=10
+ else
+ NEW_PKGREL=$((OLD_PKGREL + 1))
+ fi
+
BRANCH="update/kernel-${NEW_MAJOR}.${NEW_MINOR}-${NEW_TAGREL}"
git config user.name "RaveOS Bot"
@@ -105,7 +112,7 @@ jobs:
sed -i "s/^_minor=.*/_minor=${NEW_MINOR}/" linux-raveos/PKGBUILD
sed -i "s/^_tagrel=.*/_tagrel=${NEW_TAGREL}/" linux-raveos/PKGBUILD
sed -i "s/^pkgver=.*/pkgver=${NEW_PKGVER}/" linux-raveos/PKGBUILD
- sed -i "s/^pkgrel=.*/pkgrel=20/" linux-raveos/PKGBUILD
+ sed -i "s/^pkgrel=.*/pkgrel=${NEW_PKGREL}/" linux-raveos/PKGBUILD
# Uj CachyOS config letoltese + RaveOS javitasok visszarakasa
curl -fsSL --retry 3 \
@@ -117,7 +124,7 @@ jobs:
sed -i 's/^# CONFIG_NTSYNC is not set$/CONFIG_NTSYNC=y/' linux-raveos/config
git add linux-raveos/PKGBUILD linux-raveos/config
- git commit -m "update: linux-cachyos ${NEW_MAJOR}.${NEW_MINOR}-${NEW_TAGREL} (pkgver=${NEW_PKGVER}-20)"
+ git commit -m "update: linux-cachyos ${NEW_MAJOR}.${NEW_MINOR}-${NEW_TAGREL} (pkgver=${NEW_PKGVER}-${NEW_PKGREL})"
git remote set-url origin "https://bot:${{ secrets.FORGEJO_TOKEN }}@git.rp1.hu/RaveOS/RaveOS-PKGBUILD.git"
git push origin "$BRANCH"