forked from getsops/sops
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
44 lines (39 loc) · 1.12 KB
/
.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
34
35
36
37
38
39
40
41
42
43
44
language: go
go: 1.9
go_import_path: go.mozilla.org/sops/
addons:
apt:
packages:
- rpm
- ruby
- python3
before_install:
- gem install fpm || sudo gem install fpm
- curl https://sh.rustup.rs -sSf | sh -s -- -y
- source ~/.cargo/env
script:
- make
- bash <(curl -s https://codecov.io/bash)
before_deploy:
- mkdir dist
- make deb-pkg rpm-pkg
- mv *.deb *.rpm dist/
- GOOS=darwin CGO_ENABLED=0 go build -o dist/sops-${TRAVIS_TAG}.darwin go.mozilla.org/sops/cmd/sops
- GOOS=windows CGO_ENABLED=0 go build -o dist/sops-${TRAVIS_TAG}.exe go.mozilla.org/sops/cmd/sops
- GOOS=linux CGO_ENABLED=0 go build -o dist/sops-${TRAVIS_TAG}.linux go.mozilla.org/sops/cmd/sops
- |
if [ ! -z "$TRAVIS_TAG" ]; then
version="$(grep '^const version' cmd/sops/version.go |cut -d '"' -f 2)"
if [ "$version" != "$TRAVIS_TAG" ]; then
echo "Git tag $TRAVIS_TAG does not match version $version, update the source!"
exit 1
fi
fi
deploy:
provider: releases
api_key: "${GITHUB_OAUTH_TOKEN}"
file_glob: true
file: dist/*
skip_cleanup: true
on:
tags: true