forked from buildpacks/pack
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add DEVELOPMENT.md, relevant policies in CONTRIBUTING.md, README.md c…
…leanup Signed-off-by: Javier Romero <[email protected]>
- Loading branch information
Showing
4 changed files
with
154 additions
and
96 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,102 +1,77 @@ | ||
We're glad you are interested in contributing to this project. We hope that this | ||
document helps you get started. | ||
|
||
If something is missing, incorrect, or made irrelevant please feel free to make | ||
a PR to keep it up-to-date. | ||
## Project Policies | ||
|
||
## Prerequisites | ||
This repository adhere's to the following project policies: | ||
|
||
- [Go](https://golang.org/dl/) | ||
- including [Git](https://git-scm.com/) | ||
- [Docker](https://www.docker.com/) | ||
- [Code of Conduct](https://github.com/buildpacks/.github/blob/master/CODE_OF_CONDUCT.md) | ||
- [Security](https://github.com/buildpacks/.github/blob/master/SECURITY.md) | ||
- [Support](https://github.com/buildpacks/.github/blob/master/SUPPORT.md) | ||
|
||
## Development | ||
## Pull Request Process | ||
|
||
### Building | ||
1. [Fork][fork] the repository. | ||
2. Create a branch for the issue: `git checkout -b {{BRANCH_NAME}}` | ||
3. Make any changes deemed necessary. | ||
4. Commit your changes: `git commit -s`\ | ||
_Learn more about the [sign-off](#sign-off-process) process below._ | ||
5. Push to GitHub: `git push origin {{BRANCH_NAME}}` | ||
6. [Create the pull request][create-pr]. | ||
|
||
To build pack: | ||
``` | ||
make build | ||
``` | ||
|
||
This will output the binary to the directory `out/`. | ||
|
||
Options: | ||
|
||
| ENV_VAR | Description | Default | | ||
|--------------|------------------------------------------------------------------------|---------| | ||
| GOCMD | Change the `go` executable. For example, [richgo][rgo] for testing. | go | | ||
| PACK_BIN | Change the name or location of the binary relative to `out/`. | pack | | ||
| PACK_VERSION | Tell `pack` what version to consider itself | `dev` | | ||
|
||
[rgo]: https://github.com/kyoh86/richgo | ||
|
||
_NOTE: This project uses [go modules](https://github.com/golang/go/wiki/Modules) for dependency management._ | ||
|
||
### Testing | ||
|
||
To run unit and integration tests: | ||
|
||
```bash | ||
make unit | ||
``` | ||
|
||
To run acceptance tests: | ||
```bash | ||
make acceptance | ||
``` | ||
|
||
Alternately, to run all tests: | ||
```bash | ||
make test | ||
``` | ||
## Sign-off Process | ||
|
||
### Formatting | ||
Every commit contributed to this project must be signed-off. | ||
|
||
To format the code: | ||
A sign-off is a single line added to your commit messages that certifies that you wrote the contributed changes. | ||
|
||
```bash | ||
make format | ||
The full text of the certification from [developercertificate.org](http://developercertificate.org/) is a follows: | ||
``` | ||
|
||
### Verification | ||
|
||
To verify formatting and vet: | ||
```bash | ||
make verify | ||
Developer Certificate of Origin | ||
Version 1.1 | ||
Copyright (C) 2004, 2006 The Linux Foundation and its contributors. | ||
1 Letterman Drive | ||
Suite D4700 | ||
San Francisco, CA, 94129 | ||
Everyone is permitted to copy and distribute verbatim copies of this | ||
license document, but changing it is not allowed. | ||
Developer's Certificate of Origin 1.1 | ||
By making a contribution to this project, I certify that: | ||
(a) The contribution was created in whole or in part by me and I | ||
have the right to submit it under the open source license | ||
indicated in the file; or | ||
(b) The contribution is based upon previous work that, to the best | ||
of my knowledge, is covered under an appropriate open source | ||
license and I have the right under that license to submit that | ||
work with modifications, whether created in whole or in part | ||
by me, under the same open source license (unless I am | ||
permitted to submit under a different license), as indicated | ||
in the file; or | ||
(c) The contribution was provided directly to me by some other | ||
person who certified (a), (b) or (c) and I have not modified | ||
it. | ||
(d) I understand and agree that this project and the contribution | ||
are public and that a record of the contribution (including all | ||
personal information I submit with it, including my sign-off) is | ||
maintained indefinitely and may be redistributed consistent with | ||
this project or the open source license(s) involved. | ||
``` | ||
|
||
## Pull Requests | ||
|
||
1. **[Fork]((https://help.github.com/en/articles/fork-a-repo)) the repo** | ||
2. **Code, Test, Commit...** | ||
|
||
_Don't forget utilize the convenient make functions above._ | ||
|
||
3. **Preparing a Branch** | ||
|
||
We prefer to have PRs that are encompassed in a single commit. This might | ||
require that you execute some of these commands: | ||
|
||
If you are no up-to-date with master: | ||
```bash | ||
# rebase from master (applies your changes on top of master) | ||
git pull -r origin master | ||
``` | ||
|
||
If you made more than one commit: | ||
```bash | ||
# squash multiple commits, if applicable | ||
# set the top most commit to `pick` and all subsequent to `squash` | ||
git rebase -i origin/master | ||
``` | ||
The signature should look as such: | ||
|
||
Another requirement is that you sign your work. See [DCO](https://probot.github.io/apps/dco/) for more details. | ||
```bash | ||
git commit --amend --signoff | ||
``` | ||
Signed-off-by: Joe Smith <[email protected]> | ||
|
||
4. **Submit a Pull Request** | ||
> Pro-tip: `git` can automatically add the signature by adding the `-s` flag to the commit command:\ | ||
> `git commit -s` | ||
Submitting the pull request is done in [GitHub](https://github.com/buildpacks/pack/compare/) by selecting | ||
your branch as the `compare` branch. | ||
[fork]: https://help.github.com/en/github/getting-started-with-github/fork-a-repo | ||
[create-pr]: https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request-from-a-fork |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
# Development | ||
|
||
## Prerequisites | ||
|
||
* [Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) | ||
* [Go](https://golang.org/doc/install) | ||
* [Docker](https://www.docker.com/) | ||
* Make | ||
* macOS: `xcode-select --install` | ||
* Windows: `choco install make` | ||
|
||
## Tasks | ||
|
||
### Building | ||
|
||
To build pack: | ||
``` | ||
make build | ||
``` | ||
|
||
This will output the binary to the directory `out/`. | ||
|
||
Options: | ||
|
||
| ENV_VAR | Description | Default | | ||
|--------------|------------------------------------------------------------------------|---------| | ||
| GOCMD | Change the `go` executable. For example, [richgo][rgo] for testing. | go | | ||
| PACK_BIN | Change the name or location of the binary relative to `out/`. | pack | | ||
| PACK_VERSION | Tell `pack` what version to consider itself | `dev` | | ||
|
||
[rgo]: https://github.com/kyoh86/richgo | ||
|
||
_NOTE: This project uses [go modules](https://github.com/golang/go/wiki/Modules) for dependency management._ | ||
|
||
### Testing | ||
|
||
To run unit and integration tests: | ||
```shell | ||
make unit | ||
``` | ||
|
||
To run acceptance tests: | ||
```shell | ||
make acceptance | ||
``` | ||
|
||
Alternately, to run all tests: | ||
```shell | ||
make test | ||
``` | ||
|
||
### Tidy | ||
|
||
To format the code: | ||
```shell | ||
make format | ||
``` | ||
|
||
To tidy up the codebase and dependencies: | ||
```shell | ||
make tidy | ||
``` | ||
|
||
### Verification | ||
|
||
To verify formatting and code quality: | ||
```shell | ||
make verify | ||
``` | ||
|
||
### Prepare for PR | ||
|
||
Runs various checks to ensure compliance: | ||
```shell | ||
make prepare-for-pr | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.