Build an osx package with osx builder.

This commit is contained in:
David Newhall II 2019-06-05 03:46:05 -07:00
parent 7d9e2feb6f
commit 99adf6a764
2 changed files with 11 additions and 14 deletions

View File

@ -1,33 +1,30 @@
language: go language: go
# so we can build an osx package.
os: osx
addons: addons:
apt: homebrew:
packages: packages:
- ruby-dev
- rpm - rpm
- build-essential - gnu-tar
- git
- libgnome-keyring-dev
- fakeroot
go: go:
- 1.12.x - 1.12.x
env:
- PATH=${PATH}:/home/travis/.gem/ruby/2.4.0/bin
before_install: before_install:
- mkdir -p $GOPATH/bin
# This deploy is not used atm. # This deploy is not used atm.
- openssl aes-256-cbc -K $encrypted_9f3147001275_key -iv $encrypted_9f3147001275_iv -in .github_deploy_key.enc -out github_deploy_key -d - openssl aes-256-cbc -K $encrypted_9f3147001275_key -iv $encrypted_9f3147001275_iv -in .github_deploy_key.enc -out github_deploy_key -d
- chmod 600 github_deploy_key - chmod 600 github_deploy_key
- eval $(ssh-agent -s) - eval $(ssh-agent -s)
- ssh-add github_deploy_key - ssh-add github_deploy_key
# Download the `dep` binary to bin folder in $GOPATH # Download the `dep` binary to bin folder in $GOPATH
- curl -L -s https://github.com/golang/dep/releases/download/v0.5.3/dep-linux-amd64 -o $GOPATH/bin/dep - curl -sLo $GOPATH/bin/dep https://github.com/golang/dep/releases/download/v0.5.3/dep-linux-amd64
- chmod +x $GOPATH/bin/dep - chmod +x $GOPATH/bin/dep
# download super-linter: golangci-lint # download super-linter: golangci-lint
- curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(go env GOPATH)/bin latest - curl -sL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(go env GOPATH)/bin latest
install: install:
- dep ensure - dep ensure
- gem install --no-document ronn fpm - rvm $brew_ruby do gem install --no-document ronn fpm
script: script:
- make release - rvm $brew_ruby do make release
deploy: deploy:
provider: releases provider: releases
api_key: api_key:

View File

@ -5,12 +5,12 @@ VERSION=`git tag -l --merged | tail -n1`
all: man unifi-poller all: man unifi-poller
# Prepare a release. Called in Travis CI. # Prepare a release. Called in Travis CI.
release: clean test man linux macos rpm deb release: clean test man linux macos rpm deb osxpkg
mkdir -p build_assets mkdir -p build_assets
gzip -9k unifi-poller.linux gzip -9k unifi-poller.linux
gzip -9k unifi-poller.macos gzip -9k unifi-poller.macos
mv unifi-poller.macos.gz unifi-poller.linux.gz build_assets/ mv unifi-poller.macos.gz unifi-poller.linux.gz build_assets/
cp *.rpm *.deb build_assets/ cp *.rpm *.deb *.pkg build_assets/
clean: clean:
rm -f `echo $(PACKAGE)|cut -d/ -f3`{.macos,.linux,.1,}{,.gz} rm -f `echo $(PACKAGE)|cut -d/ -f3`{.macos,.linux,.1,}{,.gz}