From 45c46c7af3d8ffdde4f9ef54fd985a5dd2b5fd0a Mon Sep 17 00:00:00 2001 From: Kevin Sapper Date: Wed, 4 May 2016 22:05:40 +0200 Subject: [PATCH] Problem: Deploying release artifacts is a manual process Solution: Use travis to deploy these artifacts automatically. The deployment is triggered by tagging on the zeromq/libzmq repository. Of the many builds travis is checking only the default one with libsodium and drafts disabled is used for deployment. For now the results of `make distcheck` are deployed as well as their md5 and sha1 hash sums. Further changes may upload a generated Changelog as well. --- .travis.yml | 16 ++++++++++++++++ ci_deploy.sh | 20 ++++++++++++++++++++ 2 files changed, 36 insertions(+) create mode 100755 ci_deploy.sh diff --git a/.travis.yml b/.travis.yml index d92946e8..619cea03 100644 --- a/.travis.yml +++ b/.travis.yml @@ -34,3 +34,19 @@ before_script: # Build and check this project script: - ./autogen.sh && ./configure --with-libsodium --prefix=${BUILD_PREFIX} && make distcheck + +# Deploy tags +before_deploy: +- . ./ci_deploy.sh +deploy: + provider: releases + api_key: + secure: "VIOyO6gR+E4PH9i48eq8gF15PYTZamUOLwbaa4nnwCgmKy+iiwIrXBF/FZ9SdzjeUUSrK0v1gAfC389U+ZBjdD0NQTcSZ9UngvSALgtI7w4gQMJ09G74Sowcm21PIO/Pn3V4xpO0ciJ7xb2aGP6zhbGOiK/nmv8MXUM/PzxvH6A=" + file_glob: true + file: ${ZEROMQ4X_DEPLOYMENT} + skip_cleanup: true + on: + repo: zeromq/zeromq4-x + branch: master + tags: true + condition: "$TRAVIS_OS_NAME =~ (linux)" diff --git a/ci_deploy.sh b/ci_deploy.sh new file mode 100755 index 00000000..38606bfb --- /dev/null +++ b/ci_deploy.sh @@ -0,0 +1,20 @@ +#!/usr/bin/env bash + +set -x +set -e + +if [[ $TRAVIS_OS_NAME =~ (linux) ]]; then + # Tell travis to deploy all files in dist + mkdir dist + export ZEROMQ4X_DEPLOYMENT=dist/* + # Move archives to dist + mv *.tar.gz dist + mv *.zip dist + # Generate hash sums + cd dist + md5sum *.zip *.tar.gz > MD5SUMS + sha1sum *.zip *.tar.gz > SHA1SUMS + cd - +else + export ZEROMQ4X_DEPLOYMENT="" +fi