Skip to content
This repository has been archived by the owner on Apr 25, 2023. It is now read-only.

Commit

Permalink
Merge branch 'release-1.1.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
romank87 committed Feb 3, 2016
2 parents 2d8fe89 + 378e466 commit 1c71c9a
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 18 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Change Log

## [1.1.1](https://github.com/grammarly/rocker/tree/1.1.1)

[Full Changelog](https://github.com/grammarly/rocker/compare/1.1.0...1.1.1)

**Merged pull requests:**

- Use git branch names as tags for docker images [\#70](https://github.com/grammarly/rocker/pull/70) ([romank87](https://github.com/romank87))

## [1.1.0](https://github.com/grammarly/rocker/tree/1.1.0) (2016-01-29)
[Full Changelog](https://github.com/grammarly/rocker/compare/1.0.1...1.1.0)

Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,17 +49,17 @@ Go to the [releases](https://github.com/grammarly/rocker/releases) section and d

Something like this:
```bash
curl -SL https://github.com/grammarly/rocker/releases/download/1.0.1/rocker-1.0.1_darwin_amd64.tar.gz | tar -xzC /usr/local/bin && chmod +x /usr/local/bin/rocker
curl -SL https://github.com/grammarly/rocker/releases/download/1.1.0/rocker-1.1.0-darwin_amd64.tar.gz | tar -xzC /usr/local/bin && chmod +x /usr/local/bin/rocker
```

### Building locally

`make` will produce the `bin/rocker` binary.
You can build rocker locally assuming [$GOPATH](https://github.com/golang/go/wiki/GOPATH) env variable is set:

```bash
make
make install
GO15VENDOREXPERIMENT=1 go get github.com/grammarly/rocker
```
binary will be available at $GOPATH/bin/rocker

### Getting help, usage:

Expand Down
21 changes: 8 additions & 13 deletions Rockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
FROM golang:1.5.1

{{ assert .Version }}
{{ $stable := "0.2.3" }}
{{ $beta := "0.2.4" }}
{{ $v1 := "1." }}
{{ $commit := (or .Env.GIT_COMMIT "") }}
{{ $branch := (or .Env.GIT_BRANCH "none") }}
{{ $version:= (or .Version "local") }}

ADD . /go/src/github.com/grammarly/rocker
WORKDIR /go/src/github.com/grammarly/rocker
Expand All @@ -22,10 +21,9 @@ RUN make test
ATTACH ["bash"]

RUN \
TIME=$(TZ=GMT date "+%Y-%m-%d_%H:%M_GMT") \
go build \
-a -installsuffix cgo \
-ldflags "-X main.Version={{ .Version }} -X main.GitCommit=$commit -X main.GitBranch=$branch -X main.BuildTime=$TIME" \
-ldflags "-X main.Version={{$version}} -X main.GitCommit={{$commit}} -X main.GitBranch={{$branch}} -X main.BuildTime=$(TZ=GMT date '+%Y-%m-%d_%H:%M_GMT')" \
-v -o /bin/rocker

EXPORT /bin/rocker
Expand All @@ -47,12 +45,9 @@ ENV PATH=/opt/rocker/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin

CMD ["/opt/rocker/bin/rocker"]

PUSH dockerhub.grammarly.io/rocker:{{ .Version }}
PUSH dockerhub.grammarly.io/rocker:{{ $branch }}

{{ if hasPrefix .Version $stable }}
PUSH dockerhub.grammarly.io/rocker:stable
{{ else if hasPrefix .Version $beta }}
PUSH dockerhub.grammarly.io/rocker:beta
{{ else if hasPrefix .Version $v1 }}
PUSH dockerhub.grammarly.io/rocker:v1
{{ if and (ne $version "local") (eq $branch "master") }}
PUSH dockerhub.grammarly.io/rocker:{{ $version }}
{{ end }}

2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.1.0
1.1.1

0 comments on commit 1c71c9a

Please sign in to comment.