2021-07-26 20:34:17 +02:00
|
|
|
#!/bin/sh
|
|
|
|
|
2021-07-26 20:37:40 +02:00
|
|
|
update_github_tag() {
|
|
|
|
local repo=$1
|
|
|
|
|
2021-07-26 20:42:58 +02:00
|
|
|
ver=`curl -Ls https://api.github.com/repos/${repo}/tags | jq -r '.[0].name' | cut -c2-`
|
2021-07-26 20:37:40 +02:00
|
|
|
echo $ver
|
|
|
|
sed -i "s/pkgver=.*/pkgver=${ver}/" PKGBUILD
|
|
|
|
}
|
|
|
|
|
2021-07-26 20:34:17 +02:00
|
|
|
update_pkg() {
|
|
|
|
|
2021-08-20 07:04:08 +02:00
|
|
|
updpkgsums
|
2021-07-26 20:34:17 +02:00
|
|
|
|
|
|
|
if [ $? -eq 0 ]
|
|
|
|
then
|
|
|
|
makepkg --printsrcinfo > .SRCINFO
|
|
|
|
git add .SRCINFO PKGBUILD
|
2021-08-20 07:09:29 +02:00
|
|
|
git commit -m "$(basename $(pwd)): update to $ver [CI SKIP]"
|
2021-07-26 20:34:17 +02:00
|
|
|
if [ $? -eq 0 ]
|
|
|
|
then
|
2021-08-20 07:09:29 +02:00
|
|
|
git push --set-upstream origin $DRONE_SOURCE_BRANCH
|
2021-07-26 20:34:17 +02:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
}
|