Skip to content

Commit b6f65c9

Browse files
author
Vaughn Dice
committed
fix(bintray): add unique version to bin name
1 parent 511c8ea commit b6f65c9

3 files changed

Lines changed: 16 additions & 5 deletions

File tree

.travis.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,8 @@ install:
3636
script:
3737
- make test
3838
- make -C client/ bootstrap build test
39-
- mv client/deis client/deis-linux-amd64
40-
- GOOS=darwin GOARCH=amd64 make -C client build
41-
- mv client/deis client/deis-darwin-amd64
4239
- make -C docs/ build test
40+
before_deploy: make dist prep-bintray-json
4341
deploy:
4442
- provider: script
4543
# ensure client/doc builds aren't removed

_scripts/ci/bintray-template.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,10 @@
88
"name": "0.0.0"
99
},
1010
"files": [
11-
{ "includePattern": "client/deis-linux-amd64", "uploadPattern": "deis-linux-amd64" },
12-
{ "includePattern": "client/deis-darwin-amd64", "uploadPattern": "deis-darwin-amd64" }
11+
{
12+
"includePattern": "_dist/(.*)",
13+
"uploadPattern": "$1"
14+
}
1315
],
1416
"publish": true
1517
}

client/Makefile

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,16 @@ DEV_ENV_IMAGE := quay.io/deis/go-dev:0.5.0
77
DEV_ENV_WORK_DIR := /go/src/${repo_path}
88
DEV_ENV_PREFIX := docker run --rm -e GO15VENDOREXPERIMENT=1 -e CGO_ENABLED=0 -v ${CURDIR}:${DEV_ENV_WORK_DIR} -w ${DEV_ENV_WORK_DIR}
99
DEV_ENV_CMD := ${DEV_ENV_PREFIX} ${DEV_ENV_IMAGE}
10+
DIST_DIR := _dist
1011

1112
GO_FILES = $(wildcard *.go)
1213
GO_PACKAGES = cmd controller/api controller/client $(wildcard controller/models/*) parser $(wildcard pkg/*)
1314
GO_PACKAGES_REPO_PATH = $(addprefix $(repo_path)/,$(GO_PACKAGES))
1415
GOFMT = gofmt -e -l -s
1516
GOTEST = go test --cover --race -v
1617

18+
VERSION := $(shell git describe --tags --abbrev=0 2>/dev/null)+$(shell git rev-parse --short HEAD)
19+
1720
define check-static-binary
1821
if file $(1) | egrep -q "(statically linked|Mach-O)"; then \
1922
echo -n ""; \
@@ -33,9 +36,17 @@ build:
3336
${DEV_ENV_CMD} make binary-build
3437
@$(call check-static-binary,deis)
3538

39+
build-all:
40+
gox -verbose \
41+
-os="linux darwin " \
42+
-arch="amd64 386" \
43+
-output="$(DIST_DIR)/deis-${VERSION}-{{.OS}}-{{.Arch}}" .
44+
3645
binary-build:
3746
go build -a -installsuffix cgo -ldflags '-s' -o deis .
3847

48+
dist: build-all
49+
3950
install:
4051
cp deis $$GOPATH/bin
4152

0 commit comments

Comments
 (0)