Zip compiled Windows executables.

This commit is contained in:
Vidar Holen 2017-06-10 09:26:08 -07:00
parent 5cece759cc
commit 5fad708df5
2 changed files with 36 additions and 2 deletions

34
.prepare_deploy Executable file
View File

@ -0,0 +1,34 @@
#!/bin/bash
# This script packages up Travis compiled binaries
set -ex
shopt -s nullglob
cd deploy
cp ../LICENSE LICENSE.txt
sed -e $'s/$/\r/' > README.txt << END
This is a precompiled ShellCheck binary.
http://www.shellcheck.net/
ShellCheck is a static analysis tool for shell scripts.
It's licensed under the GNU General Public License v3.0.
Information and source code is available on the website.
This binary was compiled on $(date -u).
====== Latest commits ======
$(git log -n 3)
END
for file in ./*.exe
do
zip "${file%.*}.zip" README.txt LICENSE.txt "$file"
done
for file in ./*
do
sha512sum "$file" > "$file.sha512sum"
done

View File

@ -13,16 +13,16 @@ before_install:
script: script:
- mkdir deploy - mkdir deploy
# Windows .exe # Windows .exe
- rm -rf dist cabal || true
- docker pull koalaman/winghc - docker pull koalaman/winghc
- docker run -v "$PWD:/appdata" koalaman/winghc cuib - docker run -v "$PWD:/appdata" koalaman/winghc cuib
- cp "dist/build/ShellCheck/shellcheck.exe" "deploy/windows-$TAG.exe" - cp "dist/build/ShellCheck/shellcheck.exe" "deploy/shellcheck-$TAG.exe"
# Linux Docker # Linux Docker
- docker build -t builder -f Dockerfile_builder . - docker build -t builder -f Dockerfile_builder .
- docker run --rm -it -v "$(pwd):/mnt" builder - docker run --rm -it -v "$(pwd):/mnt" builder
- docker build -t "$DOCKER_REPO:$TAG" . - docker build -t "$DOCKER_REPO:$TAG" .
after_success: after_success:
- ./.prepare_deploy
- docker login -e="$DOCKER_EMAIL" -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD" - docker login -e="$DOCKER_EMAIL" -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD"
- |- - |-
([ "$TRAVIS_BRANCH" == "master" ] || [ -n "$TRAVIS_TAG" ]) && docker push "$DOCKER_REPO:$TAG" ([ "$TRAVIS_BRANCH" == "master" ] || [ -n "$TRAVIS_TAG" ]) && docker push "$DOCKER_REPO:$TAG"