From 3f7c3c2658986cab620c986a6d2995a96b56697b 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 100644 ci_deploy.sh diff --git a/.travis.yml b/.travis.yml index 24649fed..84dfb633 100644 --- a/.travis.yml +++ b/.travis.yml @@ -33,3 +33,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: "F05Ia6El6hhB0uFAGPztZioIN33XnVO6HT2l2RW/JGojr6yAUqM3ZD8kLxu/KCA7hX1fQw45VBf4oqu34uNRBks3vzjeBjZRvZx9mag4y979q5cMppUCyfdV8ugFcsUaEFmsCp/7IIweWMuymmaHJPpzswwCHsyPNyWsj4WMxTmI9Cs0mZjR1G48Vf3DcfLcosU5lPW/8HItU8ZOCRuqPOGJLZaGnJqdK5k0Zh4owNUXMbZuKH3slcXurGICJ9bRsPVue2bBkbLa8w0DfkAQlGXpihXufGEz8ue9+9ay1IjDONHCnoc1tqLoNXq1pX1kZtZRy/fHw5k0IVjHUQV57XXgqcvQOdb0pjI0R7HJQqdH/SslsYPH+6jXc2ClwxtghuTO5S98CTHBCjqbeMDJ3NnkAK3nQ/cgujNyxNo4x7xQpsfpHLq443pm5qX6XJCGSFv45S/znlarDmxHblVFj1P8OmeaB0Ui/NU3Kwc41e5X1HtXDK9DWRSDqtKS5jnQC7ITsnTTmmOLgr/c4r7OMIq33ZVj72WSGlE4b1PKLfXNJ7xCsRlkNY5sSVBOHoaaawKbSgBaeHdobnYZFw8oz/ReFOJpftZ743OqYT5KdSUHTaRyYULDOFOT8pstMQrszuoDNO27pwhHJ9Fap7oI7cXkXz4cawNUSoJHm4geaPM=" + file_glob: true + file: ${ZEROMQ41_DEPLOYMENT} + skip_cleanup: true + on: + repo: zeromq/zeromq4-1 + branch: master + tags: true + condition: "$TRAVIS_OS_NAME =~ (linux)" diff --git a/ci_deploy.sh b/ci_deploy.sh new file mode 100644 index 00000000..190c7643 --- /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 ZEROMQ41_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 ZEROMQ4-1_DEPLOYMENT="" +fi