0
0
mirror of https://github.com/zeromq/libzmq.git synced 2024-12-27 07:31:03 +08:00
libzmq/ci_deploy.sh
Luca Boccassi e1d07b61ca Problem: release script for OBS build fails often
Solution: now that tar_scm supports @PARENT_TAG@ as a revision to
automatically fetch the most recent tag on the default branch, use
it to simplify everything

https://github.com/openSUSE/obs-service-tar_scm/pull/359
2020-05-11 19:31:23 +01:00

29 lines
876 B
Bash

#!/usr/bin/env bash
# do NOT set -x or it will log the secret tokens!
set -e
if [[ $BUILD_TYPE == "default" && $CURVE == "libsodium" && -z $DRAFT ]]; then
# Tell travis to deploy all files in dist
mkdir dist
export LIBZMQ_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 -
# Trigger source run on new tag on OBS. The latest tag will be fetched.
if [ -n "${OBS_STABLE_TOKEN}" ]; then
curl -H "Authorization: Token ${OBS_STABLE_TOKEN}" -X POST https://api.opensuse.org/trigger/runservice
fi
if [ -n "${OBS_DRAFT_TOKEN}" ]; then
curl -H "Authorization: Token ${OBS_DRAFT_TOKEN}" -X POST https://api.opensuse.org/trigger/runservice
fi
else
export LIBZMQ_DEPLOYMENT=""
fi