Install GHR from binary
This commit is contained in:
parent
285d23dee8
commit
8ab6e9374b
13
.travis.yml
13
.travis.yml
@ -1,7 +1,9 @@
|
||||
language: generic
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- libgmp-dev
|
||||
language: c
|
||||
sudo: false
|
||||
go:
|
||||
- 1.7.x
|
||||
cache:
|
||||
directories:
|
||||
- $HOME/.local/bin
|
||||
@ -11,10 +13,7 @@ os:
|
||||
- osx
|
||||
before_install:
|
||||
- sh tools/install-stack.sh
|
||||
install:
|
||||
- export GOPATH="${TRAVIS_BUILD_DIR}/go"
|
||||
- export PATH="${TRAVIS_BUILD_DIR}/go/bin:$PATH"
|
||||
- go get -u github.com/tcnksm/ghr
|
||||
- sh tools/install-ghr.sh
|
||||
script:
|
||||
- stack setup
|
||||
- stack build --ghc-options -O2 --pedantic
|
||||
|
20
tools/install-ghr.sh
Normal file
20
tools/install-ghr.sh
Normal file
@ -0,0 +1,20 @@
|
||||
set -o errexit -o verbose
|
||||
|
||||
if test ! "$TRAVIS_TAG"
|
||||
then
|
||||
echo 'This is not a release build.'
|
||||
else
|
||||
if [ "$TRAVIS_OS_NAME" = "linux" ]
|
||||
then
|
||||
ARCH="linux"
|
||||
else
|
||||
ARCH="darwin"
|
||||
fi
|
||||
echo "Installing ghr"
|
||||
URL="https://github.com/tcnksm/ghr/releases/download/v0.5.4/ghr_v0.5.4_${ARCH}_386.zip"
|
||||
curl -L ${URL} > ghr.zip
|
||||
mkdir -p "$HOME/bin"
|
||||
export PATH="$HOME/bin:$PATH"
|
||||
unzip ghr.zip -d "$HOME/bin"
|
||||
rm ghr.zip
|
||||
fi
|
Loading…
x
Reference in New Issue
Block a user