summaryrefslogtreecommitdiff
path: root/scripts/travis/deploy_packages.sh
blob: c98b95730475cad0c6f0a181d5d8f288b0454703 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/usr/bin/env bash

# deploy_packages.sh - Script executed by Travis for 'Deploy' step, if build / tests succeed
#
# Syntax:   deploy_packages.sh
#
# Usage:    Should only be used by Travis.
#
# Examples: scripts/travis/deploy_packages.sh

set -e

SCRIPTPATH="$( cd "$(dirname "$0")" ; pwd -P )"

# Get the go build version.
GOLANG_VERSION=$("${SCRIPTPATH}/../get_golang_version.sh")

curl -sL -o ~/gimme https://raw.githubusercontent.com/travis-ci/gimme/master/gimme
chmod +x ~/gimme
eval "$(~/gimme "${GOLANG_VERSION}")"

if ! "${SCRIPTPATH}/../check_golang_version.sh"
then
    exit 1
fi

scripts/travis/build.sh

export RELEASE_GENESIS_PROCESS=true
export NO_BUILD=true
export SkipCleanCheck=1
scripts/deploy_version.sh "${TRAVIS_BRANCH}" "$(./scripts/osarchtype.sh)"