diff --git a/.travis.yml b/.travis.yml index a19cc11..cd0da39 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,27 +4,29 @@ go: - 1.5 env: - - "GIMME_OS=linux GIMME_ARCH=amd64" - - "GIMME_OS=darwin GIMME_ARCH=amd64" - - "GIMME_OS=windows GIMME_ARCH=amd64" - - "GIMME_OS=windows GIMME_ARCH=386" + - "MY_GOOS=linux MY_GOARCH=amd64" + - "MY_GOOS=darwin MY_GOARCH=amd64" + - "MY_GOOS=windows MY_GOARCH=amd64" + - "MY_GOOS=windows MY_GOARCH=386" -# workaround for travis-ci/gimme#25 to pick up latest version of gimme and run again before_install: - - curl -o gimme -sL https://raw.githubusercontent.com/travis-ci/gimme/master/gimme - - chmod u+x gimme - - unset GOROOT GOTOOLDIR - - eval "$(./gimme 1.5)" - - go version - - go env +# workaround for travis-ci/gimme#42 + - curl -o go.tar.gz -sL https://storage.googleapis.com/golang/go1.6.3.linux-amd64.tar.gz + - tar -C $HOME -xf go.tar.gz + - rm go.tar.gz + - export GOROOT="${HOME}/go" + - export PATH="${GOROOT}/bin:${PATH}" + - export GOOS="${MY_GOOS}" + - export GOARCH="${MY_GOARCH}" +# end of workaround ### install: - go get -d -t ./... - - "if test $GIMME_OS.$GIMME_ARCH = linux.amd64; then npm install; fi" + - "if test $GOOS.$GOARCH = linux.amd64; then npm install; fi" script: - go install -v ./... - - "if test $GIMME_OS.$GIMME_ARCH = linux.amd64; then npm test; fi" + - "if test $GOOS.$GOARCH = linux.amd64; then npm test; fi" notifications: irc: diff --git a/.travis_rename_releases.sh b/.travis_rename_releases.sh index 943c0b9..d950c31 100755 --- a/.travis_rename_releases.sh +++ b/.travis_rename_releases.sh @@ -5,7 +5,7 @@ # set an environment variable for its location that we can use in .travis.yml for # publishing back to github. -# all cross-compiled binaries are in subdirectories: ${GOPATH}/bin/${GIMME_OS}_${GIMME_ARCH}/ +# all cross-compiled binaries are in subdirectories: ${GOPATH}/bin/${GOOS}_${GOARCH}/ # linux 64 bit, not cross-compiled, breaks this rule and is in ${GOPATH}/bin # therefore move it to match the convention of the others, to simplify subsequent steps # note: we don't know what we built, so only move it if we happen to be linux amd64 travis job @@ -16,10 +16,10 @@ fi # linux, darwin: FILE_EXT="" -[ "${GIMME_OS}" == "windows" ] && FILE_EXT=".exe" +[ "${GOOS}" == "windows" ] && FILE_EXT=".exe" # let's rename the release file because it has a 1:1 mapping with what it is called on # github releases, and therefore the name for each platform needs to be unique so that # they don't overwrite each other. Set a variable that can be used in .travis.yml -export RELEASE_FILE="${TRAVIS_BUILD_DIR}/livelog-${GIMME_OS}-${GIMME_ARCH}${FILE_EXT}" -mv "${GOPATH}/bin/${GIMME_OS}_${GIMME_ARCH}/livelog${FILE_EXT}" "${RELEASE_FILE}" +export RELEASE_FILE="${TRAVIS_BUILD_DIR}/livelog-${GOOS}-${GOARCH}${FILE_EXT}" +mv "${GOPATH}/bin/${GOOS}_${GOARCH}/livelog${FILE_EXT}" "${RELEASE_FILE}"