Skip to content

Commit

Permalink
fix: リリース作業をコンテナ化
Browse files Browse the repository at this point in the history
  • Loading branch information
keroxp committed Aug 31, 2018
1 parent 809be98 commit e8d139b
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 5 deletions.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
vendor
.idea
dist
*.enc
terraform/.terraform
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
*.dll
*.so
*.dylib
.DS_Store

# Test binary, build with `go test -c`
*.test
Expand Down
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ ENV WORK_DIR /go/src/github.com/loilo-inc/canarycage
RUN apk update --no-cache \
&& apk add git bash curl make \
&& go get -u github.com/keroxp/shake \
&& go get -u github.com/golang/dep/cmd/dep
&& go get -u github.com/golang/dep/cmd/dep \
&& go get -u github.com/goreleaser/goreleaser
WORKDIR ${WORK_DIR}
COPY . ${WORK_DIR}
COPY --from=dep ${WORK_DIR}/vendor ${WORK_DIR}/vendor
12 changes: 8 additions & 4 deletions Shakefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,13 @@ test-container:
push-test-container: test-container
docker tag canarycage/test-container loilodev/http-server:latest
docker push loilodev/http-server:latest
lake:
go get -u github.com/loilo-inc/ladylake/cli/lake
release: lake
GITHUB_TOKEN=$(lake decrypt --binary -f .github_token.enc) goreleaser --rm-dist
release: build
WD=/go/src/github.com/loilo-inc/canarycage
docker run \
-v `pwd`:${WD} \
-e GITHUB_TOKEN=$(lake decrypt --binary -f .github_token.enc) \
-t canarycage shake _release
_release:
goreleaser --rm-dist
version:
go run cli/cage/main.go -v | cut -f 3 -d ' '

0 comments on commit e8d139b

Please sign in to comment.