diff --git a/.travis.yml b/.travis.yml index f09f2da..90201e9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,11 +18,11 @@ jobs: directories: - ${STACK_HOME} before_deploy: - - cp ${STACK_BIN}/unfog ${STACK_BIN}/unfog-${TRAVIS_OS_NAME} + - tar czf "${STACK_BIN}/unfog-${TRAVIS_OS_NAME}.tar.gz" -C "${STACK_BIN}" unfog deploy: &deploy_base provider: releases api_key: ${GITHUB_TOKEN} - file: ${STACK_BIN}/unfog-${TRAVIS_OS_NAME} + file: ${STACK_BIN}/unfog-${TRAVIS_OS_NAME}.tar.gz skip_cleanup: true draft: false name: ${TRAVIS_TAG} @@ -37,7 +37,7 @@ jobs: directories: - ${STACK_HOME} before_deploy: - - cp ${STACK_BIN}/unfog ${STACK_BIN}/unfog-${TRAVIS_OS_NAME} + - tar czf "${STACK_BIN}/unfog-${TRAVIS_OS_NAME}.tar.gz" -C "${STACK_BIN}" unfog deploy: <<: *deploy_base @@ -50,7 +50,7 @@ jobs: - ${STACK_HOME} - ${HOME}/AppData/Local/Programs/stack before_deploy: - - cp ${STACK_BIN}/unfog.exe ${STACK_BIN}/unfog-${TRAVIS_OS_NAME}.exe + - mv "${STACK_BIN}/unfog" "${STACK_BIN}/unfog.exe" + - tar czf "${STACK_BIN}/unfog-${TRAVIS_OS_NAME}.tar.gz" -C "${STACK_BIN}" unfog.exe deploy: <<: *deploy_base - file: ${STACK_BIN}/unfog-${TRAVIS_OS_NAME}.exe diff --git a/install.sh b/install.sh new file mode 100755 index 0000000..c2d1f4f --- /dev/null +++ b/install.sh @@ -0,0 +1,27 @@ +#!/bin/sh + +get_os () { + if [[ "$OSTYPE" == "linux-gnu" ]]; then + echo "linux" + elif [[ "$OSTYPE" == "darwin"* ]]; then + echo "osx" + elif [[ "$OSTYPE" == "cygwin" ]]; then + echo "windows" + elif [[ "$OSTYPE" == "msys" ]]; then + echo "windows" + elif [[ "$OSTYPE" == "win32" ]]; then + echo "windows" + elif [[ "$OSTYPE" == "freebsd"* ]]; then + echo "linux" + else + return -1 + fi +} + +cd /tmp +os=`get_os` +curl -Lo unfog.tar.gz "https://github.com/unfog-io/unfog-cli/releases/latest/download/unfog-${os}.tar.gz" +tar xzf unfog.tar.gz +rm unfog.tar.gz +chmod u+x unfog* +sudo mv unfog* /usr/local/bin/ diff --git a/package.yaml b/package.yaml index 6488671..e663a7b 100644 --- a/package.yaml +++ b/package.yaml @@ -1,5 +1,5 @@ name: unfog -version: 0.1.3 +version: 0.1.4 github: "unfog-io/unfog-cli" license: BSD3 author: "Clément DOUIN" @@ -42,7 +42,6 @@ executables: - -rtsopts - -with-rtsopts=-N - -O2 - - -split-objs dependencies: - unfog