2. Fork and clone your repository: `git clone https://github.com/${YOUR_NAME}/git-secret.git`
3. Make sure that everything works fine by running `make test`
### Development Process
1. Firstly, you will need to setup development hooks with `make install-hooks`
2. Make changes to the files that need to be changed
3. When making changes to any files inside `src/` you will need to rebuild the binary `git-secret` with `make clean && make build` command
4. Run [`shellcheck`](https://github.com/koalaman/shellcheck) against all your changes with `find src utils -type f -name '*.sh' -print0 | xargs -0 -I {} shellcheck {}`
5. Now, add all your files to the commit with `git add --all` and commit changes `git commit`, make sure you write a good commit message, which will explain your works
6. When running `git commit` the tests will run automatically, you commit will be canceled if they fail
7. Push to your repository, make a pull-request against `develop` branch. Please, make sure you have *one* commit per pull-request
### Branches
We have three long-live branches: `master`, `staging` and `develop` (and `gh-pages`).
-`Docker`-based jobs, or so-called 'integration tests', these tests creates a local release, installs it with the package-manager and then runs unit-tests and system checks
-`OSX` jobs, they just assure that everything will work under `OSX`
- Native `travis` jobs, which handles basic unit-tests and stylechecks
The release process is defined in the `git`-hooks and `.travis.yml`.
When creating a commit inside the `staging` branch (it is usually a documentation and changelog update with the version bump inside `src/version.sh`) it will trigger two main events.
Firstly, new manuals will be created and added to the current commit with `make build-man` on `pre-commit` hook.
Secondly, after the commit is successfully created it will also trigger `make build-gh-pages` target on `post-commit` hook, which will push new manuals to the [https://sobolevn.github.io/git-secret/][git-secret site]. And the new `git` tag will be automatically created if the version is changed:
if [[ "$NEWEST_TAG" != "v${SCRIPT_VERSION}" ]]; then
git tag -a "v${SCRIPT_VERSION}" -m "version $SCRIPT_VERSION"
fi
```
Then it will be merged inside `master` when ready.
#### Travis releases
When creating a commit inside `master` branch `travis` on successful build will publish new `deb` and `rpm` packages to [`bintray`](https://bintray.com/sobolevn).
If you wish to override previous release (*be careful*) you will need to add `"override": 1 ` into `matrixParams`, see `deb-deploy.sh` and `rpm-deploy.sh`
#### Manual releases
Releases to `brew` are made manually.
#### Dockerhub releases
[`Dockerhub`](https://hub.docker.com/r/sobolevn/git-secret/) contains `Docker` images with different OS'es used for testing. It is updated via a `github` webhook on commit into `master`.