From 2534eb239ec2309809983b5bc54b78e041b903a1 Mon Sep 17 00:00:00 2001 From: Tobias Reisinger Date: Thu, 27 Aug 2020 11:35:55 +0200 Subject: [PATCH] upgpkg: controller v0.3.5 upgpkg: controller-testing v0.3.5 add: auto-commit in upgpkg.sh --- controller-testing/PKGBUILD | 4 +-- controller/PKGBUILD | 4 +-- upgpkg.sh | 49 ++++++++++++++++++------------------- 3 files changed, 28 insertions(+), 29 deletions(-) diff --git a/controller-testing/PKGBUILD b/controller-testing/PKGBUILD index 60c71b1..52bef2b 100644 --- a/controller-testing/PKGBUILD +++ b/controller-testing/PKGBUILD @@ -1,6 +1,6 @@ # Maintainer: Tobias Reisinger pkgname=emgauwa-controller-testing -pkgver=0.3.4 +pkgver=0.3.5 pkgrel=1 epoch= pkgdesc="" @@ -19,7 +19,7 @@ source=("https://git.serguzim.me/emgauwa/controller/archive/testing-v$pkgver.tar "emgauwa-controller-testing.service" "emgauwa-controller-testing.sysusers" "emgauwa-controller-testing.tmpfiles") -sha256sums=('f4787b25bcae82421b46b9661d4e957b31613c1acad819fcbd6c9664ae42b539' +sha256sums=('af944fea87d0ecb3a4f454c966b2292fddd2d75985e2ed3cda69ba923f9e448a' '5bfbe580ef1a373e3c025f28f3de591ba7ce57c4aba20bd1cc62555043d7bd13' '0bbc44d680be2011800c553ae863663148be0820f08349993578c88e9a23b143' 'b9cde58b9e9b0605ca4a1eddd78067c55aa3c8d40f80cde0a25c4da9f6f95798' diff --git a/controller/PKGBUILD b/controller/PKGBUILD index 0cb4fbf..4bd55dc 100644 --- a/controller/PKGBUILD +++ b/controller/PKGBUILD @@ -1,6 +1,6 @@ # Maintainer: Tobias Reisinger pkgname=emgauwa-controller -pkgver=0.3.4 +pkgver=0.3.5 pkgrel=1 epoch= pkgdesc="" @@ -19,7 +19,7 @@ source=("https://git.serguzim.me/emgauwa/controller/archive/v$pkgver.tar.gz" "emgauwa-controller.service" "emgauwa-controller.sysusers" "emgauwa-controller.tmpfiles") -sha256sums=('f4787b25bcae82421b46b9661d4e957b31613c1acad819fcbd6c9664ae42b539' +sha256sums=('af944fea87d0ecb3a4f454c966b2292fddd2d75985e2ed3cda69ba923f9e448a' '7d886240280705c26d64dcda6eafd372e8f8e4a17cc85502d788e9195ad8418f' '8ece4b409d5550cdae23591217e440d8599ebf2175f2a91574c0b069314879a0' 'b9cde58b9e9b0605ca4a1eddd78067c55aa3c8d40f80cde0a25c4da9f6f95798' diff --git a/upgpkg.sh b/upgpkg.sh index 173cb67..7713665 100755 --- a/upgpkg.sh +++ b/upgpkg.sh @@ -21,32 +21,31 @@ function get_latest_version() echo $latest_version } -cd core -latest_version=$(get_latest_version core) -sed -i "s/pkgver=.*$/pkgver=$latest_version/" PKGBUILD -updpkgsums -cd .. +commit_message="" -cd core-testing -latest_version=$(get_latest_version core testing) -sed -i "s/pkgver=.*$/pkgver=$latest_version/" PKGBUILD -updpkgsums -cd .. +function upgrade_package() +{ + cd $1 -cd controller -latest_version=$(get_latest_version controller) -sed -i "s/pkgver=.*$/pkgver=$latest_version/" PKGBUILD -updpkgsums -cd .. + current_version=$(grep -Po "pkgver=\K.*$" PKGBUILD) + latest_version=$(get_latest_version $2) -cd controller-testing -latest_version=$(get_latest_version controller testing) -sed -i "s/pkgver=.*$/pkgver=$latest_version/" PKGBUILD -updpkgsums -cd .. + sed -i "s/pkgver=.*$/pkgver=$latest_version/" PKGBUILD + updpkgsums -cd webapp -latest_version=$(get_latest_version client) -sed -i "s/pkgver=.*$/pkgver=$latest_version/" PKGBUILD -updpkgsums -cd .. + if [ "$current_version" != "$latest_version" ] + then + commit_message="$commit_message\nupgpkg: $1 v$latest_version" + git add PKGBUILD + fi + + cd .. +} + +upgrade_package "controller" "controller" +upgrade_package "controller-testing" "controller testing" +upgrade_package "core" "core" +upgrade_package "core-testing" "core testing" +upgrade_package "webapp" "client" + +printf "$commit_message" | git commit -F -