#!/usr/bin/env bash
set -e
package="$1"
code="$(lsb_release -sc)"
cd "$package"
# Source infos
. "/etc/makepkg.conf"
. "PKGBUILD"
package_name="${pkgname}_${CARCH}.deb"
package_path="${pkgname}_${pkgver}-${pkgrel}_${CARCH}.deb"
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
--upload-file "$package_path" \
"https://git.serguzim.me/api/packages/emgauwa/debian/pool/$code/main/upload"