From cb233ae588484634d5a6a4091ce385a362ccd3d7 Mon Sep 17 00:00:00 2001 From: Tobias Reisinger Date: Thu, 24 Aug 2023 19:46:33 +0200 Subject: [PATCH] Fix checksums and upload-gitea-package script --- client/PKGBUILD | 5 +++-- upload-gitea-package.sh | 19 ++++++++++++++----- 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/client/PKGBUILD b/client/PKGBUILD index 0b39d2a..178f9e0 100644 --- a/client/PKGBUILD +++ b/client/PKGBUILD @@ -9,9 +9,10 @@ url="https://git.serguzim.me/emgauwa/client" license=('unknown') groups=() source=("$pkgname-$pkgver.tar.gz::https://git.serguzim.me/emgauwa/client/releases/download/v$pkgver/emgauwa.tar.gz") -sha256sums=('e2d99ef8ed8c420ea56f7f15629ff397d9c7be638b7c4d918e87e1ca634a970f') +sha256sums=('fe5c802bd1331105fafb48f416ed79d6bc76484183953a36b777a402532617c3') package() { install -d "$pkgdir/usr/share/webapps/" - cp -R "$srcdir/emgauwa" "$pkgdir/usr/share/webapps/emgauwa" + cp -R "$srcdir/" "$pkgdir/usr/share/webapps/emgauwa/" + rm "$pkgdir/usr/share/webapps/emgauwa/emgauwa-client-$pkgver.tar.gz" } diff --git a/upload-gitea-package.sh b/upload-gitea-package.sh index 1097b5e..46b28f7 100755 --- a/upload-gitea-package.sh +++ b/upload-gitea-package.sh @@ -3,12 +3,11 @@ set -e package="$1" -credentials="$2" + +code="$(lsb_release -sc)" cd "$package" -makedeb -s - # Source infos . "/etc/makepkg.conf" . "PKGBUILD" @@ -16,6 +15,16 @@ makedeb -s package_name="${pkgname}_${CARCH}.deb" package_path="${pkgname}_${pkgver}-${pkgrel}_${CARCH}.deb" -curl --user "$credentials" \ +delete_pkg() { + curl --user "$GITEA_CREDENTIALS" \ + -X DELETE \ + "https://git.serguzim.me/api/packages/emgauwa/generic/$pkgname/$pkgver/$package_name" + exit +} +#delete_pkg + +makedeb #-s + +curl --user "$GITEA_CREDENTIALS" \ --upload-file "$package_path" \ - "https://git.serguzim.me/api/packages/emgauwa/generic/$pkgname/$pkgver/$package_name" + "https://git.serguzim.me/api/packages/emgauwa/debian/pool/$code/main/upload"