diff options
-rw-r--r-- | .SRCINFO | 6 | ||||
-rw-r--r-- | PKGBUILD | 9 | ||||
-rwxr-xr-x | update.sh | 36 |
3 files changed, 44 insertions, 7 deletions
@@ -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 @@ -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 000000000000..71479f11658a --- /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};" |