purescript: update script only considers full releases

Make sure the purescript update script only considers full releases.
Before this change, the purescript update script would consider
prereleases as valid releases.  This caused the r-ryantm bot to
create PRs trying to update the purescript derivation in Nixpkgs
to prerelease versions.

See https://github.com/NixOS/nixpkgs/pull/174485#issuecomment-1137291664
and
https://discourse.purescript.org/t/purescript-continuous-prereleases/3006/2?u=cdepillabout
for slightly more information.
This commit is contained in:
Dennis Gosnell 2022-05-27 13:40:36 +09:00
parent 03eb4fd7ae
commit 4b4115df70
No known key found for this signature in database
GPG key ID: 462E0C03D11422F4

View file

@ -14,7 +14,7 @@ purescript_derivation_file="${script_dir}/default.nix"
old_version="$(sed -En 's/.*\bversion = "(.*?)".*/\1/p' "$purescript_derivation_file")"
# This is the latest release version of PureScript on GitHub.
new_version=$(curl --silent "https://api.github.com/repos/purescript/purescript/releases" | jq '.[0].tag_name' --raw-output | sed -e 's/v//')
new_version=$(curl --silent "https://api.github.com/repos/purescript/purescript/releases/latest" | jq '.tag_name' --raw-output | sed -e 's/v//')
echo "Updating purescript from old version v${old_version} to new version v${new_version}."
echo