blob: d258d6b5a0540ce397a6308b131dfb9f19cd5aa5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
#!/usr/bin/env bash
curl -s https://snapcraft.io/taskade > taskade.html
current_version=$(grep -Po "^pkgver=\K.*" PKGBUILD)
version=$(sed -n '/<script type="application\/ld+json">/,/<\/script>/p' taskade.html | \
sed 's/<script type="application\/ld+json">//g' | \
sed 's/<\/script>//g' | \
jq -r '. as $json | if $json["@type"] == "SoftwareApplication" then $json.softwareVersion else empty end')
echo "current version is $current_version"
echo "found version $version"
rm taskade.html
# check if version is different
if [ "$current_version" != "$version" ]; then
echo "Build the thing"
echo "pkgver=$version" > build.env
else
echo "No new version"
fi
|