Skip to content
This repository was archived by the owner on May 19, 2020. It is now read-only.

Commit e62347a

Browse files
committed
Unified documentation and readme
1 parent a800b5f commit e62347a

File tree

1 file changed

+17
-10
lines changed

1 file changed

+17
-10
lines changed

README.md

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,26 +12,33 @@ Drone plugin to clone `git` repositories. For the usage information and a listin
1212

1313
## Build
1414

15-
Build the binary with the following commands:
15+
Build the binary with the following command:
1616

17-
```
18-
go build
17+
```console
18+
export GOOS=linux
19+
export GOARCH=amd64
20+
export CGO_ENABLED=0
21+
export GO111MODULE=on
22+
23+
go build -v -a -tags netgo -o release/linux/amd64/drone-git
1924
```
2025

2126
## Docker
2227

23-
Build the Docker image with the following commands:
28+
Build the Docker image with the following command:
2429

25-
```
26-
GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -a -tags netgo -o release/linux/amd64/drone-git
27-
docker build --rm -t plugins/git .
30+
```console
31+
docker build \
32+
--label org.label-schema.build-date=$(date -u +"%Y-%m-%dT%H:%M:%SZ") \
33+
--label org.label-schema.vcs-ref=$(git rev-parse --short HEAD) \
34+
--file docker/Dockerfile.linux.amd64 --tag plugins/git .
2835
```
2936

3037
## Usage
3138

3239
Clone a commit:
3340

34-
```
41+
```console
3542
docker run --rm \
3643
-e DRONE_REMOTE_URL=https://github.com/garyburd/redigo.git \
3744
-e DRONE_WORKSPACE=/go/src/github.com/garyburd/redigo \
@@ -43,7 +50,7 @@ docker run --rm \
4350

4451
Clone a pull request:
4552

46-
```
53+
```console
4754
docker run --rm \
4855
-e DRONE_REMOTE_URL=https://github.com/garyburd/redigo.git \
4956
-e DRONE_WORKSPACE=/go/src/github.com/garyburd/redigo \
@@ -55,7 +62,7 @@ docker run --rm \
5562

5663
Clone a tag:
5764

58-
```
65+
```console
5966
docker run --rm \
6067
-e DRONE_REMOTE_URL=https://github.com/garyburd/redigo.git \
6168
-e DRONE_WORKSPACE=/go/src/github.com/garyburd/redigo \

0 commit comments

Comments
 (0)