From 7966a1d8cd70e992f3b780846ec6a01324428435 Mon Sep 17 00:00:00 2001 From: Claudia Yan Date: Tue, 22 Oct 2019 10:54:38 -0400 Subject: [PATCH] trying to split up the package target on travis --- .travis.yml | 18 ++++++++++++++++-- Makefile | 4 +++- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 37459cc..7043c45 100644 --- a/.travis.yml +++ b/.travis.yml @@ -51,9 +51,24 @@ jobs: name: Unit Test on Windows os: windows # script: make unittest - - name: Deploy Release + - name: Deploy Release osx stage: deploy os: osx + script: + - make VERSION=${TRAVIS_TAG} package-osx + - make deploy + deploy: + provider: releases + skip_cleanup: true + api_key: "$GITHUB_OAUTH_TOKEN" + file: package/* + file_glob: true + on: + branch: master + tags: true + - name: Deploy Release win/linux + stage: deploy + os: linux script: - make VERSION=${TRAVIS_TAG} package - make deploy @@ -66,4 +81,3 @@ jobs: on: branch: master tags: true - diff --git a/Makefile b/Makefile index 7b23049..9ea871c 100644 --- a/Makefile +++ b/Makefile @@ -80,9 +80,11 @@ build-linux build-darwin build-windows: ## Build the binary of the respective op GOOS=$(os) GOARCH=amd64 go build -o $(BUILD_PATH)/$(build_binary) -ldflags "-X main.VERSION=$(VERSION)" .PHONY: package -package: tar-darwin tar-windows tar-linux ## Creates packages for all operating systems and store them in package/ dir +package: tar-windows tar-linux ## Creates packages for all operating systems and store them in package/ dir # package: tar-linux deb-linux rpm-linux tar-darwin brew-darwin tar-windows ## Creates packages for all operating systems and store them in package/ dir +package-osx: tar-darwin + .PHONY: tar-linux tar-linux: build-linux ## Build the linux binary and package it in a .tar file .PHONY: tar-darwin