aboutsummarylogtreecommitdiffstats
path: root/update-version.sh
blob: 8bc8c30b09cf60e44771867bc45fccbc17a46ff5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
set -eu
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
cd $SCRIPT_DIR

version=$(curl -sL \
	-H "Accept: application/vnd.github+json" \
	https://api.github.com/repos/quarto-dev/quarto-cli/releases |\
	jq "map(select(.prerelease))[0].name" -r |\
	tr -d "v")
echo $version
sha256sum=$(curl -sL https://github.com/quarto-dev/quarto-cli/releases/download/v$version/quarto-$version-checksums.txt | grep "amd.*deb" | cut -f1 -d" ")
echo $sha256sum

sed "s/:version:/$version/;s/:shasum:/$sha256sum/" PKGBUILD.template > PKGBUILD

makepkg --printsrcinfo > .SRCINFO
git add -A
git commit -am "Autorelease version $version"
git push