fix makefile and use after_success

This commit is contained in:
Scott Miller 2015-09-24 14:44:39 -04:00
parent a97d7c0168
commit a01c286666
2 changed files with 3 additions and 3 deletions

View File

@ -19,12 +19,12 @@ go:
script:
# TODO: Bring this back: - fgt golint
# - make test
- make build
- CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -ldflags "-X main.buildCommit `git describe --long --tags --dirty --always`" ./cmd/ssh-chat
- ssh-keygen -f ~/.ssh/id_rsa -t rsa -N ''
- cp ~/.ssh/id_rsa id_rsa
- docker build -t "$DOCKER_USER"/ssh-chat:latest .
after_script:
after_success:
- test $TRAVIS_PULL_REQUEST == "false" && test $TRAVIS_BRANCH == "master"
- docker login -e="$DOCKER_EMAIL" -u="$DOCKER_USER" -p="$DOCKER_PASS"
- docker push $DOCKER_USER/ssh-chat:latest

View File

@ -7,7 +7,7 @@ SRCS = %.go
all: $(BINARY)
$(BINARY): deps **/**/*.go **/*.go *.go
CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -ldflags "-X main.buildCommit `git describe --long --tags --dirty --always`" ./cmd/ssh-chat
go build -ldflags "-X main.buildCommit `git describe --long --tags --dirty --always`" ./cmd/ssh-chat
deps:
go get ./...