Skip to content

Commit 2d18b50

Browse files
committed
Update contribution guidelines
1 parent 35ca32d commit 2d18b50

3 files changed

Lines changed: 19 additions & 93 deletions

File tree

.github/CONTRIBUTING.md

Lines changed: 19 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -7,87 +7,33 @@ At the same time, reading the contributing guidelines will give you a better ide
77
meaningful issues that will be more easily be parsed, considered, and resolved. A big win for
88
everyone involved!
99

10+
## Developing the Driver
1011

11-
## Table of Contents
12+
If you wish to work on the driver, you'll first need [Go](http://www.golang.org) installed on your machine.
1213

13-
A high level overview of our contributing guidelines.
14+
*Note:* This project uses [Go Modules](https://blog.golang.org/using-go-modules) making it safe to work with it outside
15+
of your existing [GOPATH](http://golang.org/doc/code.html#GOPATH). The instructions that follow assume a directory in your
16+
home directory outside of the standard GOPATH (i.e `$HOME/development/docker-machine-driver-cloudsigma/`).
1417

15-
- [Contributing Code](#contributing-code)
16-
- [Setting Up Your Development Environment](#setting-up-your-development-environment)
17-
- [Build Tasks](#build-tasks)
18-
- [Testing and Building](#testing-and-building)
18+
Clone repository to: `$HOME/development/docker-machine-driver-cloudsigma/`
1919

20-
Don't fret, it's not as daunting as the table of contents makes it out to be!
21-
22-
23-
## Contributing Code
24-
25-
These guidelines will help you get your Pull Request into shape so that a code review can start
26-
as soon as possible.
27-
28-
### Setting Up Your Development Environment
29-
30-
Fork, then clone the `https://github.com/cloudsigma/docker-machine-driver-cloudsigma` repo into
31-
*$GOPATH/src/github.com/cloudsigma/docker-machine-driver-cloudsigma*.
32-
This it important because of golang import path!
33-
34-
```bash
35-
$ mkdir -p $GOPATH/src/github.com/cloudsigma/docker-machine-driver-cloudsigma
36-
$ cd $GOPATH/src/github.com/cloudsigma/docker-machine-driver-cloudsigma
37-
$ git clone https://github.com/cloudsigma/docker-machine-driver-cloudsigma .
38-
# Change remote name from 'origin' to 'upstream'
39-
$ git remote rename origin upstream
40-
# Add remote with name 'origin' from your forked repo
41-
$ git remote add origin git@github.com:<YOUR-GITHUB-USERNAME>/docker-machine-driver-cloudsigma.git
42-
# Change remote for master branch
43-
$ git config branch.master.remote origin
44-
```
45-
46-
Now you can keep your forked repository up-to-date with the upstream repository with `git fetch upstream`
47-
and push to your repository with `git push`. See [GitHub Help](https://help.github.com/articles/syncing-a-fork/)
48-
for more details.
49-
50-
The project uses [Mage](https://magefile.org/) as build tool instead of make, so if you start working
51-
with our project, then **first install mage**:
52-
53-
```bash
54-
$ go get -u github.com/magefile/mage
20+
```sh
21+
$ mkdir -p $HOME/development; cd $HOME/development
22+
$ git clone git@github.com:cloudsigma/docker-machine-driver-cloudsigma.git
23+
...
5524
```
5625

57-
Please note that minimum version for building the CloudSigma driver is **Go 1.9 or higher**.
58-
59-
### Build Tasks
60-
61-
The project has predefined the following tasks:
62-
63-
```
64-
build Build binary for default local system's operating system and architecture.
65-
check Run all checks and tests.
66-
clean Delete the build directory.
67-
fmt Run gofmt linter.
68-
release Build release binaries for all supported versions.
69-
test Run all tests.
70-
vendor Install all dependencies into vendor directory.
71-
vet Run go vet linter.
72-
```
73-
74-
Task dependencies can be seen on the picture below.
75-
![build-tasks](build_tasks.png)
76-
77-
E.g. if you run `mage build`, then following tasks will be executed: `fmt -> vendor -> vet -> test -> build`.
78-
Any customizations of the build process can be done in [Magefile.go](../Magefile.go).
79-
80-
### Testing and Building
81-
82-
To ensure that your changes will not break other functionality, please run the `check` task and
83-
build process before submitting your Pull Request. You can do it, just run:
26+
Enter the driver directory and run `make tools`. This will install the needed tools for the driver.
8427

85-
```bash
86-
$ mage check
28+
```sh
29+
$ make tools
8730
```
8831

89-
If you want to build docker driver binary file for testing purpose, just run:
32+
To compile the driver, run `make build`. This will build the driver and put the provider binary in the `build` directory.
9033

91-
```bash
92-
$ mage build
34+
```sh
35+
$ make build
36+
...
37+
$ build/docker-machine-driver-cloudsigma
38+
...
9339
```

.github/ISSUE_TEMPLATE.md

Lines changed: 0 additions & 20 deletions
This file was deleted.

.github/build_tasks.png

-33.6 KB
Binary file not shown.

0 commit comments

Comments
 (0)