Fix checksums and upload-gitea-package script

This commit is contained in:
Tobias Reisinger 2023-08-24 19:46:33 +02:00
parent 15e1422012
commit cb233ae588
Signed by: serguzim
GPG key ID: 13AD60C237A28DFE
2 changed files with 17 additions and 7 deletions

View file

@ -9,9 +9,10 @@ url="https://git.serguzim.me/emgauwa/client"
license=('unknown') license=('unknown')
groups=() groups=()
source=("$pkgname-$pkgver.tar.gz::https://git.serguzim.me/emgauwa/client/releases/download/v$pkgver/emgauwa.tar.gz") source=("$pkgname-$pkgver.tar.gz::https://git.serguzim.me/emgauwa/client/releases/download/v$pkgver/emgauwa.tar.gz")
sha256sums=('e2d99ef8ed8c420ea56f7f15629ff397d9c7be638b7c4d918e87e1ca634a970f') sha256sums=('fe5c802bd1331105fafb48f416ed79d6bc76484183953a36b777a402532617c3')
package() { package() {
install -d "$pkgdir/usr/share/webapps/" 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"
} }

View file

@ -3,12 +3,11 @@
set -e set -e
package="$1" package="$1"
credentials="$2"
code="$(lsb_release -sc)"
cd "$package" cd "$package"
makedeb -s
# Source infos # Source infos
. "/etc/makepkg.conf" . "/etc/makepkg.conf"
. "PKGBUILD" . "PKGBUILD"
@ -16,6 +15,16 @@ makedeb -s
package_name="${pkgname}_${CARCH}.deb" package_name="${pkgname}_${CARCH}.deb"
package_path="${pkgname}_${pkgver}-${pkgrel}_${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" \ --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"