Skip to content

Commit

Permalink
Discover tar.gz asset URL
Browse files Browse the repository at this point in the history
  • Loading branch information
matiasgarciaisaia committed Aug 7, 2017
1 parent 8f70f63 commit bb815d8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion bin/compile
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,9 @@ else
CRYSTAL_VERSION_REASON='due to latest release at https://github.com/crystal-lang/crystal'
fi

CRYSTAL_URL="https://github.com/crystal-lang/crystal/releases/download/$CRYSTAL_VERSION/crystal-$CRYSTAL_VERSION-1-linux-x86_64.tar.gz"
CRYSTAL_RELEASE_ID=`${CURL} https://api.github.com/repos/crystal-lang/crystal/releases/tags/${CRYSTAL_VERSION} | json_value id 1`

CRYSTAL_URL="${CURL} https://api.github.com/repos/crystal-lang/crystal/releases/${CRYSTAL_RELEASE_ID}/assets | grep 'https://github.com/crystal-lang/crystal/releases/download/.*-linux-x86_64.tar.gz' | sed 's/.*: "\(.*\)"/\1/'"
CRYSTAL_DIR=/tmp/crystal
unset GIT_DIR

Expand Down

0 comments on commit bb815d8

Please sign in to comment.