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
|
#!/bin/bash
|
||||||
|
|
||||||
update_github_tag() {
|
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
|
echo "${ver}" | grep -Eq "^(\w|\+|\.)+$" && sed -i "s/pkgver=.*/pkgver=${ver}/" PKGBUILD
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@ update_pkg() {
|
||||||
|
|
||||||
if updpkgsums; then
|
if updpkgsums; then
|
||||||
makepkg --printsrcinfo >.SRCINFO
|
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
|
git add .SRCINFO PKGBUILD
|
||||||
if git commit -m "$(basename $(pwd)): update to ${ver} [CI SKIP]"; then
|
if git commit -m "$(basename $(pwd)): update to ${ver} [CI SKIP]"; then
|
||||||
git push --set-upstream origin "${CI_COMMIT_BRANCH}"
|
git push --set-upstream origin "${CI_COMMIT_BRANCH}"
|
||||||
|
|
10
build.sh
10
build.sh
|
@ -5,15 +5,19 @@
|
||||||
|
|
||||||
build() {
|
build() {
|
||||||
|
|
||||||
|
local upd=$1
|
||||||
|
|
||||||
if grep -c 'git+' PKGBUILD >/dev/null && ! grep -c '#tag=' PKGBUILD >/dev/null; then
|
if grep -c 'git+' PKGBUILD >/dev/null && ! grep -c '#tag=' PKGBUILD >/dev/null; then
|
||||||
makepkg --nodeps --nobuild --skippgpcheck --noconfirm
|
makepkg --nodeps --nobuild --skippgpcheck --noconfirm
|
||||||
|
if [[ "${upd}" = true ]]; then
|
||||||
update_pkg
|
update_pkg
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
name=$(grep -m1 'pkgname' .SRCINFO | cut -d'=' -f2 | tr -d ' ')
|
name=$(grep -m1 'pkgname' .SRCINFO | cut -d'=' -f2 | tr -d ' ')
|
||||||
ver=$(grep 'pkgver' .SRCINFO | cut -d'=' -f2 | tr -d ' ')
|
ver=$(grep 'pkgver' .SRCINFO | cut -d'=' -f2 | tr -d ' ')
|
||||||
rel=$(grep 'pkgrel' .SRCINFO | cut -d'=' -f2 | tr -d ' ')
|
rel=$(grep 'pkgrel' .SRCINFO | cut -d'=' -f2 | tr -d ' ')
|
||||||
epoch=$(grep 'epoch' .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}:
|
epoch=${epoch}:
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -53,7 +57,7 @@ for d in */; do
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
build
|
build true
|
||||||
fi
|
fi
|
||||||
cd ..
|
cd ..
|
||||||
done
|
done
|
||||||
|
@ -61,7 +65,7 @@ done
|
||||||
while read -r p; do
|
while read -r p; do
|
||||||
git clone https://aur.archlinux.org/"${p}".git || continue
|
git clone https://aur.archlinux.org/"${p}".git || continue
|
||||||
cd "${p}" || continue
|
cd "${p}" || continue
|
||||||
build
|
build false
|
||||||
cd ..
|
cd ..
|
||||||
done <aur.txt
|
done <aur.txt
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue