Skip to content

Commit

Permalink
Merge pull request google#937 from jimmidyson/makefile-release
Browse files Browse the repository at this point in the history
Add make release target
  • Loading branch information
jimmidyson committed Oct 22, 2015
2 parents 75401d7 + b310a4c commit 4a20353
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
cadvisor
/release
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ build:
@echo ">> building binaries"
@./build/build.sh

release: build
@./build/release.sh

docker:
@docker build -t cadvisor:$(shell git rev-parse --short HEAD) -f deploy/Dockerfile .

Expand Down
2 changes: 1 addition & 1 deletion build/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ build_date=$( date +%Y%m%d-%H:%M:%S )
go_version=$( go version | sed -e 's/^[^0-9.]*\([0-9.]*\).*/\1/' )

if [ "$(go env GOOS)" = "windows" ]; then
ext=".exe"
ext=".exe"
fi

ldflags="
Expand Down
8 changes: 8 additions & 0 deletions build/release.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash

version=$( cat version/VERSION )

rm -rf release && mkdir release
cp cadvisor release/cadvisor
go get -u github.com/progrium/gh-release
gh-release create google/cadvisor ${version}
2 changes: 1 addition & 1 deletion version/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.18.0
0.19.1

0 comments on commit 4a20353

Please sign in to comment.