Skip to content

Commit 4a20353

Browse files
committed
Merge pull request #937 from jimmidyson/makefile-release
Add make release target
2 parents 75401d7 + b310a4c commit 4a20353

File tree

5 files changed

+14
-2
lines changed

5 files changed

+14
-2
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
cadvisor
2+
/release

Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ build:
3232
@echo ">> building binaries"
3333
@./build/build.sh
3434

35+
release: build
36+
@./build/release.sh
37+
3538
docker:
3639
@docker build -t cadvisor:$(shell git rev-parse --short HEAD) -f deploy/Dockerfile .
3740

build/build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ build_date=$( date +%Y%m%d-%H:%M:%S )
2525
go_version=$( go version | sed -e 's/^[^0-9.]*\([0-9.]*\).*/\1/' )
2626

2727
if [ "$(go env GOOS)" = "windows" ]; then
28-
ext=".exe"
28+
ext=".exe"
2929
fi
3030

3131
ldflags="

build/release.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/bin/bash
2+
3+
version=$( cat version/VERSION )
4+
5+
rm -rf release && mkdir release
6+
cp cadvisor release/cadvisor
7+
go get -u github.com/progrium/gh-release
8+
gh-release create google/cadvisor ${version}

version/VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.18.0
1+
0.19.1

0 commit comments

Comments
 (0)