fix: upd git with nightly pkg
This commit is contained in:
parent
721ec5d27e
commit
e56542f6b4
2 changed files with 10 additions and 6 deletions
4
.util.sh
4
.util.sh
|
@ -1,7 +1,7 @@
|
|||
#!/bin/bash
|
||||
|
||||
update_github_tag() {
|
||||
ver=$(curl -Ls https://api.github.com/repos/"$1"/tags | jq -r '[.[] | select(.name | index("rc") | not) | select (.name | index("dev") | not)] | first | .name' | cut -c2-)
|
||||
local ver=$(curl -Ls https://api.github.com/repos/"$1"/tags | jq -r '[.[] | select(.name | index("rc") | not) | select (.name | index("dev") | not)] | first | .name' | cut -c2-)
|
||||
echo "${ver}" | grep -Eq "^(\w|\+|\.)+$" && sed -i "s/pkgver=.*/pkgver=${ver}/" PKGBUILD
|
||||
}
|
||||
|
||||
|
@ -12,7 +12,7 @@ update_pkg() {
|
|||
|
||||
if updpkgsums; then
|
||||
makepkg --printsrcinfo >.SRCINFO
|
||||
ver=$(grep 'pkgver' .SRCINFO | cut -d'=' -f2 | tr -d ' ')
|
||||
local ver=$(grep 'pkgver' .SRCINFO | cut -d'=' -f2 | tr -d ' ')
|
||||
git add .SRCINFO PKGBUILD
|
||||
if git commit -m "$(basename $(pwd)): update to ${ver} [CI SKIP]"; then
|
||||
git push --set-upstream origin "${CI_COMMIT_BRANCH}"
|
||||
|
|
10
build.sh
10
build.sh
|
@ -5,15 +5,19 @@
|
|||
|
||||
build() {
|
||||
|
||||
local upd=$1
|
||||
|
||||
if grep -c 'git+' PKGBUILD >/dev/null && ! grep -c '#tag=' PKGBUILD >/dev/null; then
|
||||
makepkg --nodeps --nobuild --skippgpcheck --noconfirm
|
||||
if [[ "${upd}" = true ]]; then
|
||||
update_pkg
|
||||
fi
|
||||
fi
|
||||
name=$(grep -m1 'pkgname' .SRCINFO | cut -d'=' -f2 | tr -d ' ')
|
||||
ver=$(grep 'pkgver' .SRCINFO | cut -d'=' -f2 | tr -d ' ')
|
||||
rel=$(grep 'pkgrel' .SRCINFO | cut -d'=' -f2 | tr -d ' ')
|
||||
epoch=$(grep 'epoch' .SRCINFO | cut -d'=' -f2 | tr -d ' ')
|
||||
if [ -n "${epoch}" ]; then
|
||||
if [[ -n "${epoch}" ]]; then
|
||||
epoch=${epoch}:
|
||||
fi
|
||||
|
||||
|
@ -53,7 +57,7 @@ for d in */; do
|
|||
fi
|
||||
fi
|
||||
|
||||
build
|
||||
build true
|
||||
fi
|
||||
cd ..
|
||||
done
|
||||
|
@ -61,7 +65,7 @@ done
|
|||
while read -r p; do
|
||||
git clone https://aur.archlinux.org/"${p}".git || continue
|
||||
cd "${p}" || continue
|
||||
build
|
||||
build false
|
||||
cd ..
|
||||
done <aur.txt
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue