blob: 2fdd28940020c1c9d1a9a6a57daa5ff33b191b52 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
#!/usr/bin/env bash
PKGNAME="saml2aws"
GHREPO="Versent/saml2aws"
log() {
printf "\e[1m\e[32m==>\e[37m %s\e[0m\n" "$@"
}
log "Fetching latest ${PKGNAME} release from Github API..."
latestversion=$(curl -sq https://api.github.com/repos/${GHREPO}/releases/latest | jq -r '.tag_name')
printf "\e[1m \e[34m->\e[37m Found version %s\e[0m\n" "${latestversion}"
log "Updating PKGBUILD version to ${latestversion/v/}-1"
sed -i "s|^pkgver=.*$|pkgver=${latestversion/v/}|; s|^pkgrel=.*$|pkgrel=1|" PKGBUILD
updpkgsums
log "Generating .SRCINFO"
makepkg --printsrcinfo > .SRCINFO
|