summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorCore2022-06-23 05:11:08 +0100
committerCore2022-06-23 05:11:08 +0100
commit11b41e0ee13d2bcbac57403b223b259b0873f0b4 (patch)
tree9ce71ce8d61af287af25c28135a8dc9ddac78af7
parent990ebb17fd63a3f26a435e683431daeb051eb834 (diff)
downloadaur-11b41e0ee13d2bcbac57403b223b259b0873f0b4.tar.gz
Version changed to match current releases
-rw-r--r--PKGBUILD17
1 files changed, 13 insertions, 4 deletions
diff --git a/PKGBUILD b/PKGBUILD
index ba4b84eaeed6..3e5d365fee71 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,8 +2,8 @@
pkgname=cider-git
_pkgname=Cider
-pkgver=1.5.1
-pkgrel=3
+pkgver=1.5.1.beta.118
+pkgrel=1
pkgdesc="Project Cider. An open-source Apple Music client built from the ground up with Vue.js and Electron. Compiled from the GitHub repositories main branch."
arch=("armv7h" "i686" "x86_64")
url="https://github.com/CiderApp/${_pkgname}.git"
@@ -22,8 +22,17 @@ sha256sums=('SKIP'
pkgver() {
cd "$srcdir/$_pkgname"
- var=$(grep '"version":.*' package.json | cut -d '"' -f 4 | head -1)
- echo ${var/-/.}.$(git rev-list --count HEAD).$(git rev-parse --short HEAD)
+ LATEST_SHA=$(curl -s https://api.github.com/repos/ciderapp/Cider/branches/stable | grep sha | cut -d '"' -f 4 | sed 's/v//' | xargs)
+ COMMITSINCESTABLE=$(git rev-list $LATEST_SHA..HEAD --count)
+ CURRENT_VERSION=$(node -p -e "require('./package.json').version")
+ if [[ $COMMITSINCESTABLE -gt 0 ]]; then
+ echo "${CURRENT_VERSION}.beta.${COMMITSINCESTABLE}"
+ NEW_VERSION="${CURRENT_VERSION}-beta.${COMMITSINCESTABLE}"
+ sed -i "0,/$CURRENT_VERSION/s//$NEW_VERSION/" package.json
+ else
+ echo ${CURRENT_VERSION/0/$COMMITSINCESTABLE}
+ fi
+
}
build() {