Improve the binary release building (Linux, OSX)
This commit is contained in:
parent
847782d689
commit
f326cad786
41
.travis.yml
41
.travis.yml
|
@ -15,16 +15,31 @@ env:
|
||||||
script: "./.travis.sh"
|
script: "./.travis.sh"
|
||||||
jobs:
|
jobs:
|
||||||
include:
|
include:
|
||||||
- stage: GitHub Release
|
- stage: GitHub Release
|
||||||
d: ldc
|
if: tag IS present
|
||||||
os: linux
|
d: ldc
|
||||||
script: echo "Deploying to GitHub releases ..." && make ldcbuild
|
os: linux
|
||||||
deploy:
|
script: echo "Deploying to GitHub releases ..." && make release
|
||||||
provider: releases
|
deploy:
|
||||||
api_key:
|
provider: releases
|
||||||
secure: pbrrm6E0SPfVwt9g+e/ZFQfrmRuGBNA6KwMMLUhI+2+kbRzNquxvrYAUC7YcRX7xiRL/gugKHmOXEi1Dv9IEdSQ732M06H7ikZT9T9oQWYbsZzmVICBWgIovyM8XIPpVAwP8D7jq0JgMiBicqfEZfoz2SIJjo6aYbyQbCASCu8U=
|
api_key: $GH_REPO_TOKEN
|
||||||
file: bin/dscanner
|
file_glob: true
|
||||||
skip_cleanup: true
|
file: bin/dscanner-*.tar.gz
|
||||||
on:
|
skip_cleanup: true
|
||||||
repo: dlang-community/D-Scanner
|
on:
|
||||||
tags: true
|
repo: dlang-community/D-Scanner
|
||||||
|
tags: true
|
||||||
|
- stage: GitHub Release
|
||||||
|
if: tag IS present
|
||||||
|
d: ldc
|
||||||
|
os: osx
|
||||||
|
script: echo "Deploying to GitHub releases ..." && make release
|
||||||
|
deploy:
|
||||||
|
provider: releases
|
||||||
|
api_key: $GH_REPO_TOKEN
|
||||||
|
file_glob: true
|
||||||
|
file: bin/dscanner-*.tar.gz
|
||||||
|
skip_cleanup: true
|
||||||
|
on:
|
||||||
|
repo: dlang-community/D-Scanner
|
||||||
|
tags: true
|
||||||
|
|
24
makefile
24
makefile
|
@ -72,3 +72,27 @@ clean:
|
||||||
report: all
|
report: all
|
||||||
dscanner --report src > src/dscanner-report.json
|
dscanner --report src > src/dscanner-report.json
|
||||||
sonar-runner
|
sonar-runner
|
||||||
|
|
||||||
|
.ONESHELL:
|
||||||
|
release:
|
||||||
|
@set -eux -o pipefail
|
||||||
|
VERSION=$$(git describe --abbrev=0 --tags)
|
||||||
|
ARCH="$${ARCH:-64}"
|
||||||
|
unameOut="$$(uname -s)"
|
||||||
|
case "$$unameOut" in
|
||||||
|
Linux*) OS=linux; ;;
|
||||||
|
Darwin*) OS=osx; ;;
|
||||||
|
*) echo "Unknown OS: $$unameOut"; exit 1
|
||||||
|
esac
|
||||||
|
|
||||||
|
case "$$ARCH" in
|
||||||
|
64) ARCH_SUFFIX="x86_64";;
|
||||||
|
32) ARCH_SUFFIX="x86";;
|
||||||
|
*) echo "Unknown ARCH: $$ARCH"; exit 1
|
||||||
|
esac
|
||||||
|
|
||||||
|
archiveName="dscanner-$$VERSION-$$OS-$$ARCH_SUFFIX.tar.gz"
|
||||||
|
|
||||||
|
echo "Building $$archiveName"
|
||||||
|
${MAKE} ldcbuild
|
||||||
|
tar cvfz "bin/$$archiveName" -C bin dscanner
|
||||||
|
|
Loading…
Reference in New Issue