diff options
| -rw-r--r-- | .github/workflows/update-pkgbuilds.yml | 47 | ||||
| -rw-r--r-- | README.md | 2 | ||||
| -rw-r--r-- | repo/ksutils-teamspeak-management-tools/PKGBUILD | 7 |
3 files changed, 49 insertions, 7 deletions
diff --git a/.github/workflows/update-pkgbuilds.yml b/.github/workflows/update-pkgbuilds.yml index 273629c..c594e1a 100644 --- a/.github/workflows/update-pkgbuilds.yml +++ b/.github/workflows/update-pkgbuilds.yml @@ -128,3 +128,50 @@ jobs: git add repo/telegram-bot-api/PKGBUILD git commit -m "feat(pkg): Update telegram-bot-api to ${VERSION}" git push + + update-ksutils-teamspeak-management-tools: + name: Update ksutils-teamspeak-management-tools + runs-on: ubuntu-latest + permissions: + contents: write + steps: + - uses: actions/checkout@v6 + + - name: Get latest release version + id: version + env: + GH_TOKEN: ${{ github.token }} + run: | + VERSION=$(gh api repos/KunoiSayami/teamspeak-management-tools.rs/releases/latest \ + --jq '.tag_name | ltrimstr("v")') + echo "version=$VERSION" >> "$GITHUB_OUTPUT" + + - name: Check current version + id: check + run: | + CURRENT=$(grep '^pkgver=' repo/ksutils-teamspeak-management-tools/PKGBUILD | cut -d'=' -f2) + echo "current=$CURRENT" >> "$GITHUB_OUTPUT" + if [ "$CURRENT" = "${{ steps.version.outputs.version }}" ]; then + echo "skip=true" >> "$GITHUB_OUTPUT" + else + echo "skip=false" >> "$GITHUB_OUTPUT" + fi + + - name: Update PKGBUILD + if: steps.check.outputs.skip == 'false' + env: + VERSION: ${{ steps.version.outputs.version }} + run: | + sed -i "s/^pkgver=.*/pkgver=${VERSION}/" repo/ksutils-teamspeak-management-tools/PKGBUILD + sed -i "s/^pkgrel=.*/pkgrel=1/" repo/ksutils-teamspeak-management-tools/PKGBUILD + + - name: Commit and push + if: steps.check.outputs.skip == 'false' + env: + VERSION: ${{ steps.version.outputs.version }} + run: | + git config user.name "github-actions[bot]" + git config user.email "github-actions[bot]@users.noreply.github.com" + git add repo/ksutils-teamspeak-management-tools/PKGBUILD + git commit -m "feat(pkg): Update ksutils-teamspeak-management-tools to ${VERSION}" + git push @@ -33,7 +33,7 @@ _Except file under `repo` folder, this folder use [UNLICENSE](repo/UNLICENSE)_ [](https://www.gnu.org/licenses/agpl-3.0.txt) -Copyright (C) 2021-2023 KunoiSayami && CoelacanthusHex +Copyright (C) 2021-2026 KunoiSayami && CoelacanthusHex This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or any later version. diff --git a/repo/ksutils-teamspeak-management-tools/PKGBUILD b/repo/ksutils-teamspeak-management-tools/PKGBUILD index b80d97f..2babf12 100644 --- a/repo/ksutils-teamspeak-management-tools/PKGBUILD +++ b/repo/ksutils-teamspeak-management-tools/PKGBUILD @@ -14,7 +14,7 @@ source=( "default.toml" ) license=('AGPL3') -optdepends=('redis: As key-value map backend') +optdepends=('valkey: As key-value map backend') sha512sums=( 'SKIP' '444af3701bfb593266efe8b2fa7f6e87cdca0bb3e36865de4d662acfdbc47e6baf81326cbbb424a62d4a447ab9f1f54fa6dda68b0e5d7782f237b4f2df8c6f9c' @@ -25,11 +25,6 @@ provides=("$_basename") options=(!lto) backup=("etc/ksutils/$_basename/default.toml") -prepare() { - cd "$pkgname" - git submodule update --init -} - build() { cd "$pkgname" cargo build --release --features all |
