summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorCore2022-08-04 16:56:39 +0100
committerCore2022-08-04 16:56:39 +0100
commit08feca0cae5448700f0163015a49d2320e5a987b (patch)
tree3e2b238f818cba040b5fde754ca2201af418f8d1 /PKGBUILD
parent15ed68a7829435ed25d85454cccce1fe14d09b18 (diff)
downloadaur-08feca0cae5448700f0163015a49d2320e5a987b.tar.gz
Now folloing the guidelines with pkgver
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD19
1 files changed, 2 insertions, 17 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 8d3869000071..9005d71e38f2 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -19,23 +19,8 @@ sha256sums=('SKIP'
'c41e9b1019411019fce8509e32f770edf33c9e864bf707c30ffe2e3f2dcf1571')
pkgver() {
- cd "$srcdir/$_pkgname"
- STABLE_SHA=$(curl -s https://api.github.com/repos/ciderapp/Cider/branches/stable | grep sha | cut -d '"' -f 4 | sed 's/v//' | xargs | cut -d' ' -f1)
- STABLE_DATE=$(git show -s --format=%ci $STABLE_SHA)
- COMMITSINCESTABLE=$(git rev-list $STABLE_SHA..HEAD --count --since="$STABLE_DATE")
- CURRENT_VERSION=$(node -p -e "require('./package.json').version")
- if [[ $COMMITSINCESTABLE -gt 1 ]]; then
- if [[ $CURRENT_VERSION == *"beta"* ]]; then
- NEW_VERSION="${CURRENT_VERSION%.*}.$COMMITSINCESTABLE"
- else
- NEW_VERSION="${CURRENT_VERSION}-beta.${COMMITSINCESTABLE}"
- fi
- echo ${NEW_VERSION//-/.}
- sed -i "0,/$CURRENT_VERSION/s//$NEW_VERSION/" package.json
- else
- echo ${CURRENT_VERSION/0/$COMMITSINCESTABLE}
- fi
-
+ cd "${srcdir}/${_pkgname}"
+ node -p -e "require('./package.json').version"
}
build() {