diff options
author | Jiří Kuchyňka (Anty) | 2021-03-03 20:45:43 +0100 |
---|---|---|
committer | Jiří Kuchyňka (Anty) | 2021-03-03 20:45:43 +0100 |
commit | 4e636dd23c2ef2ad6f4fcc3b95b916025f277b4f (patch) | |
tree | 92bf4aceceb7e3a61d40c624405a012367599f03 | |
parent | 9edf6bd13719eccb3aaa701dfba4a644032cc905 (diff) | |
download | aur-4e636dd23c2ef2ad6f4fcc3b95b916025f277b4f.tar.gz |
add updaurpkg update checking helper;
-rw-r--r-- | PKGBUILD | 17 | ||||
-rwxr-xr-x | update.sh | 36 |
2 files changed, 12 insertions, 41 deletions
@@ -1,21 +1,28 @@ # Maintainer: Anty0 <anty150 at gmail dot com> + +# Helper variables for updaurpkg (https://aur.archlinux.org/packages/updaurpkg-git) +_nextcloud_appname='integration_gitlab' +_upstreamver='v0.0.15' +_upstreamver_regex='^v[0-9]+\.[0-9]+\.[0-9]+$' +_source_type='github-releases' +_repo='nextcloud/integration_gitlab' + + pkgdesc='GitLab integration into Nextcloud' pkgname=('nextcloud-app-integration-gitlab') -_appname='integration_gitlab' -pkgver='0.0.15' +pkgver="${_upstreamver:1}" pkgrel=1 arch=('any') license=('AGPL3') -_repo="nextcloud/integration_gitlab" url="https://github.com/${_repo}" makedepends=() depends=('nextcloud') options=('!strip') -source=("${_appname}-v${pkgver}.tar.gz::${url}/releases/download/v${pkgver}/${_appname}-${pkgver}.tar.gz") +source=("${_nextcloud_appname}-v${pkgver}.tar.gz::${url}/releases/download/v${pkgver}/${_nextcloud_appname}-${pkgver}.tar.gz") sha512sums=('881e54cbaff3b579d02ed4eac11179a6d25b924d004afed7973d9cc9efc34199350d613658f243f330f0cdab3e957522bb285e701f2d34b8d11f524d78db8288') package() { install -d "${pkgdir}/usr/share/webapps/nextcloud/apps" - cp -a "${srcdir}/${_appname}" "${pkgdir}/usr/share/webapps/nextcloud/apps/${_appname}" + cp -a "${srcdir}/${_nextcloud_appname}" "${pkgdir}/usr/share/webapps/nextcloud/apps/${_nextcloud_appname}" } diff --git a/update.sh b/update.sh deleted file mode 100755 index 71479f11658a..000000000000 --- a/update.sh +++ /dev/null @@ -1,36 +0,0 @@ -#!/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};" |