Test new travis build.
This commit is contained in:
parent
ec22f6653f
commit
c7a8ff2d15
|
|
@ -24,18 +24,20 @@ before_install:
|
||||||
- rvm install 2.0.0
|
- rvm install 2.0.0
|
||||||
install:
|
install:
|
||||||
- rvm 2.0.0 do gem install --no-document fpm
|
- rvm 2.0.0 do gem install --no-document fpm
|
||||||
- dep ensure
|
|
||||||
- make docker
|
- make docker
|
||||||
- docker run -d --name unifi-poller golift/unifi-poller | tee docker_id
|
|
||||||
script:
|
script:
|
||||||
|
# Test built docker image.
|
||||||
|
- docker run -d --name unifi-poller golift/unifi-poller | tee docker_id
|
||||||
# Once we figure out how to keep it running we can remove the -a in ps args.
|
# Once we figure out how to keep it running we can remove the -a in ps args.
|
||||||
- docker ps -a | grep -q unifi-poller
|
- docker ps -a | grep -q unifi-poller
|
||||||
- docker logs $(<docker_id) 2>&1 | grep -Eq "Loaded Configuration[:] /etc/unifi-poller/up.conf"
|
- docker logs $(<docker_id) 2>&1 | grep -Eq "Loaded Configuration[:] /etc/unifi-poller/up.conf"
|
||||||
- go version
|
# test and build everything
|
||||||
- rvm 2.0.0 do make release
|
- rvm 2.0.0 do make release
|
||||||
# get deploy key for golift/homebrew-mugs.
|
|
||||||
after_success:
|
after_success:
|
||||||
- |
|
- |
|
||||||
|
# Display Release Folder
|
||||||
|
ls -l release/
|
||||||
|
# Get deploy key for golift/homebrew-mugs.
|
||||||
declare -r SSH_FILE="$(mktemp -u $HOME/.ssh/XXXXX)"
|
declare -r SSH_FILE="$(mktemp -u $HOME/.ssh/XXXXX)"
|
||||||
echo -e "Host github.com\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config
|
echo -e "Host github.com\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config
|
||||||
openssl aes-256-cbc -K $encrypted_9f3147001275_key -iv $encrypted_9f3147001275_iv -in ".travis/github_deploy_key.enc" -out "$SSH_FILE" -d
|
openssl aes-256-cbc -K $encrypted_9f3147001275_key -iv $encrypted_9f3147001275_iv -in ".travis/github_deploy_key.enc" -out "$SSH_FILE" -d
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ RPMVERSION:=$(shell echo $(VERSION) | tr -- - _)
|
||||||
all: man build
|
all: man build
|
||||||
|
|
||||||
# Prepare a release. Called in Travis CI.
|
# Prepare a release. Called in Travis CI.
|
||||||
release: clean test macos windows $(BINARY)-$(RPMVERSION)-$(ITERATION).x86_64.rpm $(BINARY)_$(VERSION)-$(ITERATION)_amd64.deb
|
release: clean dep test macos windows $(BINARY)-$(RPMVERSION)-$(ITERATION).x86_64.rpm $(BINARY)_$(VERSION)-$(ITERATION)_amd64.deb
|
||||||
# Prepareing a release!
|
# Prepareing a release!
|
||||||
mkdir -p release
|
mkdir -p release
|
||||||
mv $(BINARY).linux $(BINARY).macos release/
|
mv $(BINARY).linux $(BINARY).macos release/
|
||||||
|
|
@ -77,7 +77,7 @@ $(BINARY).macos:
|
||||||
exe: $(BINARY).exe
|
exe: $(BINARY).exe
|
||||||
windows: $(BINARY).exe
|
windows: $(BINARY).exe
|
||||||
$(BINARY).exe:
|
$(BINARY).exe:
|
||||||
# Building darwin binary.
|
# Building windows binary.
|
||||||
GOOS=windows go build -o $(BINARY).exe -ldflags "-w -s -X github.com/davidnewhall/unifi-poller/pkg/unifi-poller.Version=$(VERSION)" $(PACKAGE)
|
GOOS=windows go build -o $(BINARY).exe -ldflags "-w -s -X github.com/davidnewhall/unifi-poller/pkg/unifi-poller.Version=$(VERSION)" $(PACKAGE)
|
||||||
|
|
||||||
# Packages
|
# Packages
|
||||||
|
|
@ -190,6 +190,11 @@ uninstall:
|
||||||
[ -x /bin/systemctl ] && /bin/systemctl --system daemon-reload || true
|
[ -x /bin/systemctl ] && /bin/systemctl --system daemon-reload || true
|
||||||
@[ -f /Library/LaunchAgents/com.github.davidnewhall.$(BINARY).plist ] && echo " ==> Unload and delete this file manually:" && echo " sudo launchctl unload /Library/LaunchAgents/com.github.davidnewhall.$(BINARY).plist" && echo " sudo rm -f /Library/LaunchAgents/com.github.davidnewhall.$(BINARY).plist" || true
|
@[ -f /Library/LaunchAgents/com.github.davidnewhall.$(BINARY).plist ] && echo " ==> Unload and delete this file manually:" && echo " sudo launchctl unload /Library/LaunchAgents/com.github.davidnewhall.$(BINARY).plist" && echo " sudo rm -f /Library/LaunchAgents/com.github.davidnewhall.$(BINARY).plist" || true
|
||||||
|
|
||||||
|
# This is safe; recommended even.
|
||||||
|
dep: vendor
|
||||||
|
vendor:
|
||||||
|
dep ensure
|
||||||
|
|
||||||
# Don't run this unless you're ready to debug untested vendored dependencies.
|
# Don't run this unless you're ready to debug untested vendored dependencies.
|
||||||
deps:
|
deps:
|
||||||
dep ensure -update
|
dep ensure -update
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue