From 100859bc32e1c084d56a2c589214e7cbf4eb0187 Mon Sep 17 00:00:00 2001 From: Brian Jones Date: Fri, 18 Jan 2019 23:52:35 -0600 Subject: [PATCH] add package target, and deploy steps for travisci --- .travis.yml | 10 +++++++++- Makefile | 8 +++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 7f2aca0..897a63a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,6 +10,14 @@ matrix: script: - make get-tools - make test - after_success: - bash <(curl -s https://codecov.io/bash) +before_deploy: + - make package +deploy: + provider: releases + api_key: "$GITHUB_TOKEN" + file: "inflight-$TRAVIS_TAG.tar.gz" + skip_cleanup: true + on: + tags: true diff --git a/Makefile b/Makefile index 4159135..6a2d9c3 100644 --- a/Makefile +++ b/Makefile @@ -5,4 +5,10 @@ get-tools: test: @echo 'run `make get-tools` if you are unable to run this test`' - @go test ./... -race -coverprofile=coverage.txt -covermode=atomic \ No newline at end of file + @go test ./... -race -coverprofile=coverage.txt -covermode=atomic + +package: + @echo "+ $@: building tarball" + @cd ../ ; \ + tar -pczf "inflight-${TRAVIS_TAG}.tar.gz" --exclude "inflight/.git" inflight ; \ + mv "inflight-${TRAVIS_TAG}.tar.gz" inflight \ No newline at end of file