Skip to content

Commit

Permalink
*: Add docker support
Browse files Browse the repository at this point in the history
Signed-off-by: Ce Gao <[email protected]>
  • Loading branch information
gaocegege committed Apr 27, 2017
1 parent ad6075b commit d95d10f
Show file tree
Hide file tree
Showing 485 changed files with 182,983 additions and 3 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,6 @@ _testmain.go
*.exe
*.test
*.prof

maintainer

13 changes: 13 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
language: go

sudo: required

services:
- docker

go_import_path: github.com/gaocegege/maintainer

go:
Expand All @@ -8,3 +13,11 @@ go:
script:
- go install .
- maintainer --help

after_script:
- ./scripts/build-for-alpine.sh
- docker build -t gaocegege/maintainer .

after_success:
- docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD
- docker push gaocegege/maintainer
1 change: 0 additions & 1 deletion AUTHORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,3 @@
Ce Gao <[email protected]>

###### Auto generated by [gaocegege/maintainer](https://github.com/gaocegege/maintainer) on 2017-04-27

15 changes: 15 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
FROM alpine:3.5
MAINTAINER Ce Gao(gaocegege) <[email protected]>

RUN apk add --no-cache git \
ruby \
ruby-irb \
ruby-rdoc \
&& gem install github_changelog_generator

COPY maintainer /bin

VOLUME /workdir
WORKDIR /workdir

ENTRYPOINT ["maintainer"]
169 changes: 169 additions & 0 deletions Godeps/Godeps.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions Godeps/Readme

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 12 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
[![Go Report Card](https://goreportcard.com/badge/github.com/gaocegege/maintainer)](https://goreportcard.com/report/github.com/gaocegege/maintainer)
[![GoDoc](https://img.shields.io/badge/godoc-reference-blue.svg)](https://godoc.org/github.com/gaocegege/maintainer)
[![Build Status](https://travis-ci.org/gaocegege/maintainer.svg?branch=master)](https://travis-ci.org/gaocegege/maintainer)

[![](https://img.shields.io/badge/docker-supported-blue.svg)](https://hub.docker.com/r/gaocegege/maintainer/)

Help you to be a qualified maintainer :)

Expand All @@ -13,11 +13,21 @@ Maintainer is a CLI app which helps you to generate AUTHORS, CHANGELOG.md, CONTR

## Installation

```
```bash
$ go get github.com/gaocegege/maintainer
$ maintainer --help
```

## The Docker Way

[![](https://images.microbadger.com/badges/image/gaocegege/maintainer.svg)](https://microbadger.com/images/gaocegege/maintainer "Get your own image badge on microbadger.com")
[![](https://images.microbadger.com/badges/version/gaocegege/maintainer.svg)](https://microbadger.com/images/gaocegege/maintainer "Get your own version badge on microbadger.com")

```bash
$ docker pull gaocegege/maintainer
$ docker run --rm -v $(pwd):/workdir gaocegege/maintainer:latest --help
```

## Config

### Location
Expand Down
17 changes: 17 additions & 0 deletions scripts/build-for-alpine.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/bash

ROOT=$(dirname "${BASH_SOURCE}")/..

CONTAINER_DIR="/go/src/github.com/gaocegege/maintainer"

cd ${ROOT}

echo "Build maintainer CLI for alpine in Docker..."
docker run --rm \
-v $(pwd):${CONTAINER_DIR} \
-e GOPATH=/go \
-w ${CONTAINER_DIR} \
golang:1.8-alpine \
sh -c "go build ."
echo "Build successfully."
cd - > /dev/null
17 changes: 17 additions & 0 deletions scripts/build-in-docker.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/bash

ROOT=$(dirname "${BASH_SOURCE}")/..

CONTAINER_DIR="/go/src/github.com/gaocegege/maintainer"

cd ${ROOT}

echo "Build maintainer CLI in Docker..."
docker run --rm \
-v $(pwd):${CONTAINER_DIR} \
-e GOPATH=/go \
-w ${CONTAINER_DIR} \
golang:1.8 \
sh -c "go build ."
echo "Build successfully."
cd - > /dev/null
1 change: 1 addition & 0 deletions scripts/generate-docs.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/bin/bash

ROOT=$(dirname "${BASH_SOURCE}")/..

cd ${ROOT}
Expand Down
21 changes: 21 additions & 0 deletions vendor/github.com/cpuguy83/go-md2man/LICENSE.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 19 additions & 0 deletions vendor/github.com/cpuguy83/go-md2man/md2man/md2man.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit d95d10f

Please sign in to comment.