diff --git a/.github/workflows/build-release.yml b/.github/workflows/build-release.yml index 30cebdb..c3963aa 100644 --- a/.github/workflows/build-release.yml +++ b/.github/workflows/build-release.yml @@ -4,7 +4,7 @@ on: workflow_dispatch: inputs: version: - description: "webkit2gtk version to build (e.g. 1.1.1)" + description: "webkit2gtk version to build in pkgver-pkgrel format (e.g. 2.46.5-2)" required: true type: string diff --git a/scripts/update-aur.sh b/scripts/update-aur.sh index a17abce..7ce68c4 100644 --- a/scripts/update-aur.sh +++ b/scripts/update-aur.sh @@ -6,6 +6,10 @@ PKG_PATH="${2:?Usage: update-aur.sh }" ASSET_URL="${3:?Usage: update-aur.sh }" AUR_DIR="/build/webkit2gtk-bin" +# VERSION is in the format pkgver-pkgrel (e.g. 2.46.5-2) +PKGVER="${VERSION%-*}" +PKGREL="${VERSION##*-}" + echo "Configuring AUR SSH key..." mkdir -p /root/.ssh echo "${AUR_SSH_KEY:?AUR_SSH_KEY environment variable is not set}" > /root/.ssh/aur @@ -29,8 +33,8 @@ echo "sha256: $SHA256" echo "Updating PKBUILD..." cd "$AUR_DIR" -sed -i "s|^pkgver=.*|pkgver=${VERSION}|" PKGBUILD -sed -i "s|^pkgrel=.*|pkgrel=1|" PKGBUILD +sed -i "s|^pkgver=.*|pkgver=${PKGVER}|" PKGBUILD +sed -i "s|^pkgrel=.*|pkgrel=${PKGREL}|" PKGBUILD sed -i "s|^source=.*|source=(\"${ASSET_URL}\")|" PKGBUILD sed -i "s|^sha256sums=.*|sha256sums=(\"${SHA256}\")|" PKGBUILD