mirror of
https://github.com/jhillyerd/inbucket.git
synced 2025-12-17 09:37:02 +00:00
Only deploy with one version of Go
This commit is contained in:
15
.travis.yml
15
.travis.yml
@@ -1,14 +1,21 @@
|
|||||||
language: go
|
language: go
|
||||||
sudo: false
|
sudo: false
|
||||||
|
|
||||||
|
env:
|
||||||
|
- DEPLOY_WITH_MAJOR="1.9"
|
||||||
|
|
||||||
before_script:
|
before_script:
|
||||||
- go vet ./...
|
- go vet ./...
|
||||||
|
|
||||||
go:
|
go:
|
||||||
- 1.8.5
|
- 1.8.x
|
||||||
- 1.9.2
|
- 1.9.x
|
||||||
|
|
||||||
script: go test -race -v ./...
|
script: go test -race -v ./...
|
||||||
|
|
||||||
after_success:
|
deploy:
|
||||||
- test -n "$TRAVIS_TAG" && curl -sL https://git.io/goreleaser | bash
|
provider: script
|
||||||
|
script: etc/travis-deploy.sh
|
||||||
|
on:
|
||||||
|
tags: true
|
||||||
|
branch: master
|
||||||
|
|||||||
10
etc/travis-deploy.sh
Executable file
10
etc/travis-deploy.sh
Executable file
@@ -0,0 +1,10 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# travis-deploy.sh
|
||||||
|
# description: Trigger goreleaser deployment in correct build scenarios
|
||||||
|
|
||||||
|
set -eo pipefail
|
||||||
|
set -x
|
||||||
|
|
||||||
|
if [[ "$TRAVIS_GO_VERSION" == "$DEPLOY_WITH_MAJOR."* ]]; then
|
||||||
|
curl -sL https://git.io/goreleaser | bash
|
||||||
|
fi
|
||||||
Reference in New Issue
Block a user