-
Notifications
You must be signed in to change notification settings - Fork 2
/
.travis.yml
33 lines (27 loc) · 955 Bytes
/
.travis.yml
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
33
os: linux
dist: xenial
language: generic
branches:
except:
- /^latest$/
before_install:
- if [ -z ${TRAVIS_TAG} ] || [ ${TRAVIS_TAG} == *-* ]; then export VERSION=latest; else export VERSION=${TRAVIS_TAG}; fi
- echo ${TRAVIS_TAG}
- echo ${VERSION}
script:
- tar -C . -cvzf /tmp/ercole-checkmk-${VERSION}.tar.gz .
before_deploy:
- if [[ ${VERSION} == "latest" ]]; then git tag -f latest; fi
- if [[ ${VERSION} == "latest" ]]; then git remote add gh https://simonerota:${GITHUB_RELEASE_TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git; fi
- if [[ ${VERSION} == "latest" ]]; then git push gh latest || true; fi
- if [[ ${VERSION} == "latest" ]]; then git push -f gh latest; fi
- if [[ ${VERSION} == "latest" ]]; then git remote remove gh; fi
deploy:
provider: releases
api_key: $GITHUB_RELEASE_TOKEN
file: /tmp/ercole-checkmk-${VERSION}.tar.gz
skip_cleanup: true
name: $VERSION
overwrite: true
on:
all_branches: true