Skip to content

Commit

Permalink
adds os x for travis
Browse files Browse the repository at this point in the history
Signed-off-by: jdwelch <jdwelch@puppet.com>
  • Loading branch information
jdwelch committed Dec 11, 2018
1 parent ee6d50f commit 3c9c497
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 deletions.
16 changes: 8 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
language: go
os:
- linux
- osx
go:
- '1.11'
env:
- GO111MODULE=on
jobs:
include:
- stage: Test and build
script: make
before_deploy:
- sudo apt-get update
- sudo apt-get install -y upx
- make dist-release
script: make
before_deploy:
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get update; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get install -y upx; fi
- make dist-release
deploy:
provider: releases
api_key:
Expand Down
16 changes: 8 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -120,17 +120,17 @@ vet:

PHONY+= dist-release
dist-release:
@if [ "$(OS)" != "linux" ]; \
@if [ "$(OS)" == "osx" ]; \
then \
echo ""; \
echo "🔴 dist-release target only supported on linux (Travis CI)"; \
exit 1; \
echo "🔘 dist-release started for macOS"; \
tar czf build/lyra-darwin-amd64.tar.gz build/lyra; \
shasum -a 256 build/lyra-darwin-amd64.tar.gz | awk '{ print $1 }' > build/lyra-darwin-amd64.tar.gz.sha256; \
else \
echo "🔘 dist-release started for Linux"; \
tar czf build/lyra-linux-amd64.tar.gz build/lyra; \
sha256sum build/lyra-linux-amd64.tar.gz | awk '{ print $1 }' > build/lyra-linux-amd64.tar.gz.sha256; \
fi

echo "🔘 Deploying release to Github..."
tar czf build/lyra-linux-amd64.tar.gz build/lyra
sha256sum build/lyra-linux-amd64.tar.gz | awk '{ print $1 }' > build/lyra-linux-amd64.tar.gz.sha256

define build
@echo "🔘 building - $(1)"
mkdir -p build/
Expand Down

0 comments on commit 3c9c497

Please sign in to comment.