summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJiří Kuchyňka (Anty)2021-03-03 01:59:49 +0100
committerJiří Kuchyňka (Anty)2021-03-03 01:59:49 +0100
commitcd4492e54a193ae034005de89819002c19e067b1 (patch)
tree99d83dd49a18fab7a0ff63f0a014fed56dd2c2d5
parentd507bb6e7c533d466dbf221a5621f786c3becb5f (diff)
downloadaur-cd4492e54a193ae034005de89819002c19e067b1.tar.gz
update to 1.1.1;
-rw-r--r--.SRCINFO6
-rw-r--r--PKGBUILD9
-rwxr-xr-xupdate.sh36
3 files changed, 44 insertions, 7 deletions
diff --git a/.SRCINFO b/.SRCINFO
index f623e7d6c8d..8d65bc14c35 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,14 +1,14 @@
pkgbase = nextcloud-app-checksum
pkgdesc = Plugin for Nextcloud to create hashes of files
- pkgver = 1.0.1
+ pkgver = 1.1.1
pkgrel = 1
url = https://github.com/westberliner/checksum
arch = any
license = GPL3
depends = nextcloud
options = !strip
- source = checksum-v1.0.1.tar.gz::https://github.com/westberliner/checksum/releases/download/1.0.1/checksum.tar.gz
- sha512sums = ed25f232e1909b306229c559935281c15af10fafe0d912f1d98ad038da244e48b233d6b98da69d4dbfb690a6c74e33da76d79725dfb409eddf6ca9bace29f17e
+ source = checksum-v1.1.1.tar.gz::https://github.com/westberliner/checksum/releases/download/v1.1.1/checksum.tar.gz
+ sha512sums = 919e8d6a40264372513229fdd3f227c9c1c75c536c427c60af537817a816b3feb13eb5c48c3663f4582f33d9d33587b940b313e74afab6d49ec5dd406889d881
pkgname = nextcloud-app-checksum
diff --git a/PKGBUILD b/PKGBUILD
index 4a2378521a0..cc0fda1c5c7 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,16 +3,17 @@
pkgdesc='Plugin for Nextcloud to create hashes of files'
pkgname=('nextcloud-app-checksum')
_appname='checksum'
-pkgver=1.0.1
+pkgver='1.1.1'
pkgrel=1
arch=('any')
license=('GPL3')
-url="https://github.com/westberliner/checksum"
+_repo="westberliner/checksum"
+url="https://github.com/${_repo}"
makedepends=()
depends=('nextcloud')
options=('!strip')
-source=("${_appname}-v${pkgver}.tar.gz::${url}/releases/download/${pkgver}/${_appname}.tar.gz")
-sha512sums=('ed25f232e1909b306229c559935281c15af10fafe0d912f1d98ad038da244e48b233d6b98da69d4dbfb690a6c74e33da76d79725dfb409eddf6ca9bace29f17e')
+source=("${_appname}-v${pkgver}.tar.gz::${url}/releases/download/v${pkgver}/${_appname}.tar.gz")
+sha512sums=('919e8d6a40264372513229fdd3f227c9c1c75c536c427c60af537817a816b3feb13eb5c48c3663f4582f33d9d33587b940b313e74afab6d49ec5dd406889d881')
package() {
install -d "${pkgdir}/usr/share/webapps/nextcloud/apps"
diff --git a/update.sh b/update.sh
new file mode 100755
index 00000000000..71479f11658
--- /dev/null
+++ b/update.sh
@@ -0,0 +1,36 @@
+#!/bin/sh
+
+set -e
+
+SCRIPT_DIR="$(dirname "$0")"
+cd "$SCRIPT_DIR"
+
+source ./PKGBUILD
+
+#VERSION="$(curl -H "Accept: application/vnd.github.v3+json" "https://api.github.com/repos/${_repo}/tags" 2>/dev/null | jq -r '.[0].name')"
+#VERSION="$(curl -H "Accept: application/vnd.github.v3+json" "https://api.github.com/repos/${_repo}/releases/latest" 2>/dev/null | jq -r '.tag_name')"
+#VERSION="$(curl -H "Accept: application/vnd.github.v3+json" "https://api.github.com/repos/${_repo}/tags" 2>/dev/null | jq -r '.[0].name' | cut -c 2-)"
+VERSION="$(curl -H "Accept: application/vnd.github.v3+json" "https://api.github.com/repos/${_repo}/releases/latest" 2>/dev/null | jq -r '.tag_name' | cut -c 2-)"
+
+if [ "${pkgver}" = "${VERSION}" ]; then
+ echo "${pkgname}: No updates"
+ exit
+fi
+
+echo "${pkgname}: ${pkgver} -> ${VERSION}"
+
+if [ "$1" = "--check" ]; then
+ exit
+fi
+
+# Update
+sed -i -e "s/^pkgver=.*\$/pkgver='${VERSION}'/" -e "s/^pkgrel=.*\$/pkgrel=1/" PKGBUILD
+updpkgsums
+makepkg --printsrcinfo > .SRCINFO
+
+# Build and install
+makepkg -sicr
+
+# Commit
+git add .
+git commit -m "update to ${VERSION};"