An opinionated implementation of GitFlow
Before starting, you must be familiar with the git workflow GitFlow and with AVH's implementation of git extensions for GitFlow
git-flow-avh. You can check out a simplified cheatsheet of how the tool works here
This project intention is to build upon what git-flow-avh
already provides in order to achieve three main goals:
- Provide end-to-end automation by integrating
git-flow-avh
with a usual PR review process in a remote hosting service (ex: GitHub). - Provide safety when merging and pushing to long-living branches in the remote repositories by providing git hooks.
- Provide simplicity of usage by providing sane defaults for
git-flow-avh
that work for the vast majority of the cases.
This project has been tested on MacOS and Ubuntu Linux.
- Clone this repo
- Run the installation script
<wize-flow-repo-path>/setup.sh install
- Setup your repository by running:
git wize-flow init <your-repo-path> <your-repo-url>
- To de-initialize the repository run
git wize-flow remove <your-repo-path>
- To uninstall wize-flow completely run
<wize-flow-repo-path>/setup.sh uninstall
For git-flow-avh
usage refer to the cheatsheet. git-flow-avh
functionality for start
, publish
, pull
(discouraged) and track
commands is unmodified.
The finish
command functionality was changed so that it now expects a merged
PR in GitHub before continuing the back-merge, tagging and cleanup process. This was in part in response of suggestions to the original project: #358.
- Install shellcheck
- Run shellcheck on bash sources:
( ls *.sh | sed 's:\*::'; find src/bash src/common -type f ) | xargs shellcheck --external-sources --shell=bash
- Install bats
- Configure hub by either setting user/password:
export GITHUB_USER=<your-github-username> && export GITHUB_PASSWORD=<your-github-password>
or by setting an access token:export GITHUB_TOKEN=<your-github-access-token>
- For unit tests run
./run-test.sh
- For integration tests run
INTEGRATION_TESTS=true ./run-test.sh
(Internet connection needed) - To run an individual test from ./tests/ directory run
./run-test.sh <test-filename>
- NOTE: Always use the
run-test.sh
driver. Do not attempt to run bats directly on the .bats files.
- Install ruby
- Install bashcov:
sudo gem install bashcov
- To get the test coverage for integration tests:
INTEGRATION_TESTS=true bashcov ./run-test.sh