Upload binaries to bintray (#528)

This commit is contained in:
Eugene Kliuchnikov 2017-03-24 12:54:20 +01:00 committed by GitHub
parent 29ad4db47d
commit 187904a4b8
3 changed files with 42 additions and 2 deletions

21
.bintray.json Normal file
View File

@ -0,0 +1,21 @@
{
"package": {
"name": "${TRAVIS_OS_NAME}-bin",
"repo": "brotli",
"subject": "eustas"
},
"version": {
"name": "r${GIT_REVISION}",
"desc": "Snapshot Artifacts",
"released": "${RELEASE_DATE}",
"gpgSign": false
},
"files": [
{"includePattern": "bazel-bin/(libbrotli.*)", "uploadPattern": "$1"},
{"includePattern": "bazel-bin/bro", "uploadPattern": "bro"},
],
"publish": true
}

View File

@ -71,7 +71,7 @@ case "$1" in
mvn install && cd integration && mvn verify
;;
"bazel")
bazel test ...:all
bazel test -c opt ...:all
;;
esac
;;
@ -87,4 +87,13 @@ case "$1" in
;;
esac
;;
"before_deploy")
case "${BUILD_SYSTEM}" in
"bazel")
export GIT_REVISION=`git rev-list --count @`
export RELEASE_DATE=`date +%Y-%m-%d`
perl -p -i -e 's/\$\{([^}]+)\}/defined $ENV{$1} ? $ENV{$1} : $&/eg' .bintray.json
;;
esac
;;
esac

View File

@ -260,9 +260,10 @@ after_success:
before_deploy:
- if [ "${BUILD_SYSTEM}" = "python" ] && [ "${TRAVIS_OS_NAME}" = "osx" ]; then export WHEELS=$(ls ./dist/*.whl); fi
- ./.travis.sh before_deploy
deploy:
provider: releases
- provider: releases
api_key:
secure: YcCBi6W/w4dtKCa59Wfm8L5lGWvK7KxaFNDr3yh1Hz5aStXXf758pEMHGewnlbfbwuj5a3SjBb1nLp1M69OQJfxm442uXBaBKo52PM9PPbD7NjvbNIso73pqcSODXQXKuZxDFpEhfuDTVq3hUkUqiwhChWhrFucJsSL51i7qSss=
file: "${WHEELS}"
@ -271,3 +272,12 @@ deploy:
repo: "google/brotli"
tags: true
condition: "${BUILD_SYSTEM} = python && ${TRAVIS_OS_NAME} = osx"
- provider: bintray
file: ".bintray.json"
user: "eustas"
key:
secure: "Kbam/lTAdz72fZivbs6riJT+Y4PbuKP7r6t5PAWxJxAAykjwnYTRe3zF472g9HCE14KYMsdB+KSYSgg6TGJnqGC9gL9xhhGU9U/WmA+vbMWS/MSnMWpK9IRpp77pM2i2NKZD4v33JuEwKFCBJP3Vj6QQ5Qd1NKdobuXJyznhgnw="
on:
condition: "${BUILD_SYSTEM} = bazel"
skip_cleanup: true
dry-run: true