Skip to content

Commit

Permalink
support a new style of the GitHub releases page (#420)
Browse files Browse the repository at this point in the history
  • Loading branch information
kakkun61 authored Jun 30, 2023
1 parent cbdfe14 commit 5503e27
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion scripts/latest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ PACKAGE=stylish-haskell
echo Downloading and running $PACKAGE...

RELEASES=$(curl --silent https://github.com/haskell/$PACKAGE/releases)
URL=https://github.com/$(echo $RELEASES | grep -o '\"[^\"]*-linux-x86_64\.tar\.gz\"' | sed s/\"//g | head -n1)
ASSETS_URL=https://github.com/haskell/stylish-haskell/releases/expanded_assets/$(echo $RELEASES | grep -o 'v[0-9]\+\.[0-9]\+\.[0-9]\+\.[0-9]\+' | head -n1)
ASSETS=$(curl --silent $ASSETS_URL)
URL=https://github.com/$(echo $ASSETS | grep -o '\"[^\"]*-linux-x86_64\.tar\.gz\"' | sed s/\"//g | head -n1)
VERSION=$(echo $URL | sed -e 's/.*-\(v[\.0-9]\+-linux-x86_64\)\.tar\.gz/\1/')
TEMP=$(mktemp --directory .$PACKAGE-XXXXX)

Expand Down

0 comments on commit 5503e27

Please sign in to comment.