This commit is contained in:
MedzikUser 2022-06-18 21:27:38 +02:00
parent 3947067498
commit dabea68f5f
No known key found for this signature in database
GPG Key ID: A5FAC1E185C112DB
1 changed files with 27 additions and 24 deletions

View File

@ -78,6 +78,33 @@ update-package() {
if [ -f "${pkgdir}/built.conf" ]
then
# if package has a AUR_PUSH flag push it to AUR
if [ -n "${AUR_PUSH}" ]
then
git clone "ssh://aur@aur.archlinux.org/${AUR_PUSH}.git" "${TMP_DIR}/aur/${AUR_PUSH}"
mkdir -p "${TMP_DIR}/aur/${AUR_PUSH}" || true
cd "${TMP_DIR}/aur/${AUR_PUSH}"
# delete old files
rm -rf *
# copy new files
cp -r "${pkgdir}/*" .
# generate .SRCINFO
makepkg --printsrcinfo > .SRCINFO
# delete built config
rm -rf 'built.conf'
# commit and push package to AUR
git add .
git commit -m "upgpkg: '${pkgname}' to '${latest_version}'"
git push
fi
# check the package updates from github
if [ -n "${GITHUB_REPO}" ]
then
@ -134,30 +161,6 @@ update-package() {
echo "[i] Updated '${pkgname}' to '${latest_version}'"
if [ -n "${AUR_PUSH}" ]
then
git clone "ssh://aur@aur.archlinux.org/${AUR_PUSH}.git" "${TMP_DIR}/aur/${AUR_PUSH}"
cd "${TMP_DIR}/aur/${AUR_PUSH}"
# delete old files
rm -rf *
# copy new files
cp -r "${pkgdir}/*" .
# generate .SRCINFO
makepkg --printsrcinfo > .SRCINFO
# delete built config
rm -rf 'built.conf'
# commit and push package to AUR
git add .
git commit -m "upgpkg: '${pkgname}' to '${latest_version}'"
git push
fi
return 0
fi