Skip to content

Commit

Permalink
Filter in versions instead of filtering out RCs
Browse files Browse the repository at this point in the history
Since we're not using a proper JSON parser, we can't easily filter by
prerelease or draft attributes, instead we need to filter on the tag
values themselves. Filtering *out* `-rc$` was effective when those were
the only kind of prereleases we made, but as we experiment with Semantic
Release, this changes. It's better to use positive filtering anyway.
  • Loading branch information
pbrisbin committed Jan 23, 2025
1 parent ec7c024 commit 83c5f7a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion install
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ if [ -z "$tag" ]; then
-sSf https://api.github.com/repos/restyled-io/restyler/releases |
grep -o '"tag_name": ".*"' |
sed 's/^.*: "//; s/"$//' |
grep -v -- '-rc$' |
grep '^v[0-9]\+\.[0-9]\+\.[0-9]\+\.[0-9]\+$' |
head -n 1)
fi

Expand Down

0 comments on commit 83c5f7a

Please sign in to comment.