Skip to content

Commit 5503e27

Browse files
authored
support a new style of the GitHub releases page (#420)
1 parent cbdfe14 commit 5503e27

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

scripts/latest.sh

+3-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@ PACKAGE=stylish-haskell
77
echo Downloading and running $PACKAGE...
88

99
RELEASES=$(curl --silent https://github.com/haskell/$PACKAGE/releases)
10-
URL=https://github.com/$(echo $RELEASES | grep -o '\"[^\"]*-linux-x86_64\.tar\.gz\"' | sed s/\"//g | head -n1)
10+
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)
11+
ASSETS=$(curl --silent $ASSETS_URL)
12+
URL=https://github.com/$(echo $ASSETS | grep -o '\"[^\"]*-linux-x86_64\.tar\.gz\"' | sed s/\"//g | head -n1)
1113
VERSION=$(echo $URL | sed -e 's/.*-\(v[\.0-9]\+-linux-x86_64\)\.tar\.gz/\1/')
1214
TEMP=$(mktemp --directory .$PACKAGE-XXXXX)
1315

0 commit comments

Comments
 (0)