File tree Expand file tree Collapse file tree 4 files changed +59
-0
lines changed
Expand file tree Collapse file tree 4 files changed +59
-0
lines changed Original file line number Diff line number Diff line change 1+ .git
2+ .github
Original file line number Diff line number Diff line change 1+ [
2+ .assets []
3+ | . as $release
4+ | if (.name | test ("dhall-[0-9.]+.*-linux.tar.bz2" ; "i" )) then
5+ $release .browser_download_url
6+ else
7+ ""
8+ end
9+ ] | reduce . [] as $url ("" ; . + $url )
Original file line number Diff line number Diff line change 1+ #! /bin/sh
2+ set -e
3+
4+ apk add --quiet --no-progress curl jq
5+
6+ echo " Installing dhall version: $1 "
7+
8+ url_path=latest
9+
10+ if [ " $1 " != " latest" ]
11+ then
12+ url_path=" tags/$1 "
13+ fi
14+
15+ curl -s https://api.github.com/repos/dhall-lang/dhall-haskell/releases/$url_path > releases.json
16+
17+ core_download_url=$( jq --from-file src/core-release-filter.jq releases.json | tr -d ' "' )
18+ json_download_url=$( jq --from-file src/json-release-filter.jq releases.json | tr -d ' "' )
19+
20+ # Cleanup to make sure the download can't fail
21+ rm -f releases.json
22+ rm -f dhall-*
23+
24+ echo " Downloading dhall from: $core_download_url "
25+ wget --quiet $core_download_url
26+
27+ echo " Downloading dhall-json from: $json_download_url "
28+ wget --quiet $json_download_url
29+
30+ # Extract dhall-json first, makes shell glob easier
31+ tar --extract --bzip2 --file dhall-json-* -linux.tar.bz2
32+ rm -f dhall-json-* -linux.tar.bz2
33+
34+ # Extract dhall now that dhall-json is done
35+ tar --extract --bzip2 --file dhall-* -linux.tar.bz2
36+ rm -f dhall-* -linux.tar.bz2
37+
38+ # Add the dhall executables to the path for future actions
39+ echo " ::add-path::$( pwd) /bin"
Original file line number Diff line number Diff line change 1+ [
2+ .assets []
3+ | . as $release
4+ | if (.name | test ("dhall-json-[0-9.]+.*-linux.tar.bz2" ; "i" )) then
5+ $release .browser_download_url
6+ else
7+ ""
8+ end
9+ ] | reduce . [] as $url ("" ; . + $url )
You can’t perform that action at this time.
0 commit comments