Skip to content

Commit

Permalink
Make sure we build release artifacts and they are uploaded properly.
Browse files Browse the repository at this point in the history
Signed-off-by: David Calavera <david.calavera@gmail.com>
  • Loading branch information
calavera committed Feb 29, 2016
1 parent 435c384 commit 900f815
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 11 deletions.
4 changes: 1 addition & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@
script: make test

before_deploy:
- mkdir bin
- go build -o bin/docker-credential-osxkeychain osxkeychain/cmd/main_darwin.go
- cd bin && tar czf ../docker-credential-osxkeychain-${TRAVIS_TAG}-amd64.tar.gz docker-credential-osxkeychain
- sh ci/before_deploy.sh

deploy:
provider: releases
Expand Down
13 changes: 5 additions & 8 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,12 @@ install:
- go version
- go env

build_script:
build: false

test_script:
- go vet ./wincred
- go test -v github.com/docker/docker-credential-helpers/wincred

# Disable automatic tests
test: off

# Equivalent to `before_deploy` phase
after_test:
# build binary
Expand All @@ -49,12 +48,10 @@ after_test:

# IMPORTANT All the artifacts need to be listed here, or they won't be uploaded to GitHub
artifacts:
- path: docker-credential-wincred-%APPVEYOR_REPO_TAG_NAME%-%GOARCH%.zip
name: docker-credential-wincred-%APPVEYOR_REPO_TAG_NAME%-%GOARCH%.zip
type: zip
- path: docker-credential-wincred-$(APPVEYOR_REPO_TAG_NAME)-$(GOARCH).zip
name: docker-credential-wincred-$(APPVEYOR_REPO_TAG_NAME)-$(GOARCH).zip

deploy:
description: "Credential helpers release %APPVEYOR_REPO_TAG_NAME%"
# All the zipped artifacts will be deployed
artifact: /.*\.zip/
auth_token:
Expand Down
6 changes: 6 additions & 0 deletions ci/before_deploy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
set -ex

mkdir bin
go build -o bin/docker-credential-osxkeychain osxkeychain/cmd/main_darwin.go
cd bin
tar czf ../docker-credential-osxkeychain-${TRAVIS_TAG}-amd64.tar.gz docker-credential-osxkeychain

0 comments on commit 900f815

Please sign in to comment.