mirror of
https://github.com/containrrr/watchtower.git
synced 2025-09-22 05:40:50 +02:00
Update CONTRIBUTING.md
This commit is contained in:
parent
1f9099770b
commit
326223de0d
1 changed files with 12 additions and 9 deletions
|
@ -1,14 +1,19 @@
|
||||||
## Prerequisites
|
## Prerequisites
|
||||||
To contribute code changes to this project you will need the following development kits.
|
To contribute code changes to this project you will need the following development kits.
|
||||||
* Go. [Download and install](https://golang.org/doc/install) the Go programming language
|
* [Go](https://golang.org/doc/install)
|
||||||
* [docker](https://docs.docker.com/engine/installation/)
|
* [Docker](https://docs.docker.com/engine/installation/)
|
||||||
|
|
||||||
|
As watchtower utilizes go modules for vendor locking, you'll need atleast Go 1.11.
|
||||||
|
You can check your current version of the go language as follows:
|
||||||
|
```bash
|
||||||
|
~ $ go version
|
||||||
|
go version go1.12.1 darwin/amd64
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
## Checking out the code
|
## Checking out the code
|
||||||
When cloning watchtower to your development environment you should place your forked repo within the [standard go code structure](https://golang.org/doc/code.html#Organization).
|
Do not place your code in the go source path.
|
||||||
```bash
|
```bash
|
||||||
cd $GOPATH/src
|
|
||||||
mkdir <yourfork>
|
|
||||||
cd <yourfork>
|
|
||||||
git clone git@github.com:<yourfork>/watchtower.git
|
git clone git@github.com:<yourfork>/watchtower.git
|
||||||
cd watchtower
|
cd watchtower
|
||||||
```
|
```
|
||||||
|
@ -16,9 +21,7 @@ cd watchtower
|
||||||
## Building and testing
|
## Building and testing
|
||||||
watchtower is a go application and is built with go commands. The following commands assume that you are at the root level of your repo.
|
watchtower is a go application and is built with go commands. The following commands assume that you are at the root level of your repo.
|
||||||
```bash
|
```bash
|
||||||
go get -u github.com/Masterminds/glide # installs glide for vendoring
|
|
||||||
glide install # retrieves package dependencies
|
|
||||||
go build # compiles and packages an executable binary, watchtower
|
go build # compiles and packages an executable binary, watchtower
|
||||||
go test # runs tests
|
go test ./... -v # runs tests with verbose output
|
||||||
./watchtower # runs the application (outside of a container)
|
./watchtower # runs the application (outside of a container)
|
||||||
```
|
```
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue