From a757c7b30fa0ca6e6cac527737fdfae1a0f0b14e Mon Sep 17 00:00:00 2001 From: Tobias Reisinger Date: Tue, 25 Aug 2020 11:23:55 +0200 Subject: [PATCH] upgpkg: controller-testing v0.3.3 upgpkg: controller v0.3.3 add: new try to speed up building --- .drone.yml | 20 ++++++++++++++++++++ check_package_exists.sh | 9 +++++++++ controller-testing/PKGBUILD | 2 +- controller/PKGBUILD | 6 +++--- controller/controller.ini | 2 +- 5 files changed, 34 insertions(+), 5 deletions(-) create mode 100755 check_package_exists.sh diff --git a/.drone.yml b/.drone.yml index 8a08ddf..d298d30 100644 --- a/.drone.yml +++ b/.drone.yml @@ -13,26 +13,31 @@ steps: image: serguzim/emgauwa-packager:aarch64 commands: - cd core/ + - ../check_package_exists.sh && exit 0 - makepkg -s -f --cleanbuild --noconfirm - name: makepkg-core-testing image: serguzim/emgauwa-packager:aarch64 commands: - cd core-testing/ + - ../check_package_exists.sh && exit 0 - makepkg -s -f --cleanbuild --noconfirm - name: makepkg-controller image: serguzim/emgauwa-packager:aarch64 commands: - cd controller/ + - ../check_package_exists.sh && exit 0 - makepkg -s -f --cleanbuild --noconfirm - name: makepkg-controller-testing image: serguzim/emgauwa-packager:aarch64 commands: - cd controller-testing/ + - ../check_package_exists.sh && exit 0 - makepkg -s -f --cleanbuild --noconfirm - name: makepkg-webapp image: serguzim/emgauwa-packager:aarch64 commands: - cd webapp/ + - ../check_package_exists.sh && exit 0 - makepkg -s -f --cleanbuild --noconfirm - name: upload-packages image: serguzim/drone-webdav:aarch64 @@ -72,26 +77,31 @@ steps: image: serguzim/emgauwa-packager:armv6h commands: - cd core/ + - ../check_package_exists.sh && exit 0 - makepkg -s -f --cleanbuild --noconfirm - name: makepkg-core-testing image: serguzim/emgauwa-packager:armv6h commands: - cd core-testing/ + - ../check_package_exists.sh && exit 0 - makepkg -s -f --cleanbuild --noconfirm - name: makepkg-controller image: serguzim/emgauwa-packager:armv6h commands: - cd controller/ + - ../check_package_exists.sh && exit 0 - makepkg -s -f --cleanbuild --noconfirm - name: makepkg-controller-testing image: serguzim/emgauwa-packager:armv6h commands: - cd controller-testing/ + - ../check_package_exists.sh && exit 0 - makepkg -s -f --cleanbuild --noconfirm - name: makepkg-webapp image: serguzim/emgauwa-packager:armv6h commands: - cd webapp/ + - ../check_package_exists.sh && exit 0 - makepkg -s -f --cleanbuild --noconfirm - name: upload-packages image: serguzim/drone-webdav:armv7h @@ -131,26 +141,31 @@ steps: image: serguzim/emgauwa-packager:armv7h commands: - cd core/ + - ../check_package_exists.sh && exit 0 - makepkg -s -f --cleanbuild --noconfirm - name: makepkg-core-testing image: serguzim/emgauwa-packager:armv7h commands: - cd core-testing/ + - ../check_package_exists.sh && exit 0 - makepkg -s -f --cleanbuild --noconfirm - name: makepkg-controller image: serguzim/emgauwa-packager:armv7h commands: - cd controller/ + - ../check_package_exists.sh && exit 0 - makepkg -s -f --cleanbuild --noconfirm - name: makepkg-controller-testing image: serguzim/emgauwa-packager:armv7h commands: - cd controller-testing/ + - ../check_package_exists.sh && exit 0 - makepkg -s -f --cleanbuild --noconfirm - name: makepkg-webapp image: serguzim/emgauwa-packager:armv7h commands: - cd webapp/ + - ../check_package_exists.sh && exit 0 - makepkg -s -f --cleanbuild --noconfirm - name: upload-packages image: serguzim/drone-webdav:armv7h @@ -190,26 +205,31 @@ steps: image: serguzim/emgauwa-packager:x86_64 commands: - cd core/ + - ../check_package_exists.sh && exit 0 - makepkg -s -f --cleanbuild --noconfirm - name: makepkg-core-testing image: serguzim/emgauwa-packager:x86_64 commands: - cd core-testing/ + - ../check_package_exists.sh && exit 0 - makepkg -s -f --cleanbuild --noconfirm - name: makepkg-controller image: serguzim/emgauwa-packager:x86_64 commands: - cd controller/ + - ../check_package_exists.sh && exit 0 - makepkg -s -f --cleanbuild --noconfirm - name: makepkg-controller-testing image: serguzim/emgauwa-packager:x86_64 commands: - cd controller-testing/ + - ../check_package_exists.sh && exit 0 - makepkg -s -f --cleanbuild --noconfirm - name: makepkg-webapp image: serguzim/emgauwa-packager:x86_64 commands: - cd webapp/ + - ../check_package_exists.sh && exit 0 - makepkg -s -f --cleanbuild --noconfirm - name: upload-packages image: serguzim/drone-webdav:x86_64 diff --git a/check_package_exists.sh b/check_package_exists.sh new file mode 100755 index 0000000..09f678b --- /dev/null +++ b/check_package_exists.sh @@ -0,0 +1,9 @@ +#!/usr/bin/sh + +arch=$(grep "CARCH" /etc/makepkg.conf | grep -Po 'CARCH="\K[^"]*') +http_status=$(curl -sLI https://serguzim.me/repo/archlinux/$arch/emgauwa/$(basename $(makepkg --packagelist)) | head -n 1) +http_code=$(echo $http_status | awk '{ print $2 }') + +[ $http_code -eq 200 ] && exit 0 + +exit 1 diff --git a/controller-testing/PKGBUILD b/controller-testing/PKGBUILD index a64bfe1..1e421c0 100644 --- a/controller-testing/PKGBUILD +++ b/controller-testing/PKGBUILD @@ -1,6 +1,6 @@ # Maintainer: Tobias Reisinger pkgname=emgauwa-controller-testing -pkgver=0.3.2 +pkgver=0.3.3 pkgrel=1 epoch= pkgdesc="" diff --git a/controller/PKGBUILD b/controller/PKGBUILD index 59665c7..d9c0cab 100644 --- a/controller/PKGBUILD +++ b/controller/PKGBUILD @@ -1,7 +1,7 @@ # Maintainer: Tobias Reisinger pkgname=emgauwa-controller -pkgver=0.3.2 -pkgrel=2 +pkgver=0.3.3 +pkgrel=1 epoch= pkgdesc="" arch=('x86_64' 'armv6h' 'armv7h' 'aarch64') @@ -20,7 +20,7 @@ source=("https://git.serguzim.me/emgauwa/controller/archive/v$pkgver.tar.gz" "emgauwa-controller.sysusers" "emgauwa-controller.tmpfiles") sha256sums=('2ce6db4c299cc4064fa2d6a038462e07ad821a59071f7471865d750b6b4c94ea' - 'ecfd6167e75a8fbbeb619ce99dbd9263d321443b335d985d25cb303bb0ef61db' + '7d886240280705c26d64dcda6eafd372e8f8e4a17cc85502d788e9195ad8418f' '8ece4b409d5550cdae23591217e440d8599ebf2175f2a91574c0b069314879a0' 'b9cde58b9e9b0605ca4a1eddd78067c55aa3c8d40f80cde0a25c4da9f6f95798' 'e62f47b41f0c4f116007ca0e05e0a50b45446763ccfa91b946b9d451c83ff5b4') diff --git a/controller/controller.ini b/controller/controller.ini index 745245a..6454370 100644 --- a/controller/controller.ini +++ b/controller/controller.ini @@ -8,7 +8,7 @@ mqtt-port = 1883 mqtt-host = localhost relay-count = 10 -database = /var/lib/emgauwa/controller/db.lmdb +database = /var/lib/emgauwa/controller/db.sqlite log-level = info log-file = /var/log/emgauwa/controller.log