Skip to content

Use Git Flow with ease – maintain branches, semantic versioning, releases, and changelog with a single command.

License

Notifications You must be signed in to change notification settings

internetguru/flow

Repository files navigation

Internet Guru Flow

branch status
master tests
dev tests

Advance in a branching model according to the current branch or a branch specified with an argument. For most existing branches, the default action is release. If a given branch does not exist, Flow creates it as a feature or a hotfix depending on the current branch or a keyword (feature/hotfix).

Additionally, Flow handles version incrementing and maintains a changelog. Before proceeding, it verifies the current repository for branching model compliance and offers to correct any detected imperfections.

Branching model automation

  • Flow requires no arguments and derives a default action.
  • Flow switches between branches accordingly and advises what to do next.
  • Flow can create pull requests instead of releasing directly.
  • Flow maintains separate production branches for major versions, such as prod-1.
  • Flow supports parallel hotfixing, even for separate production branches.

Branching model validation

Setup and configuration

  • Flow can initiate a git branching repository in any folder with or without files.
  • Flow can convert any existing git repository to a git branching model.
  • Flow automatically adapts to existing branches, such as 'release' instead of the default 'staging'.

Installation

Download the latest release from GitHub. You can install as a single file (easiest), with compiled distribution package (useful for system-wide install) or from the source.

Requirements

Single file script

  1. Place flow.sh into your $PATH (e.g. ~/bin).
  2. Make the script executable.
    chmod +x flow.sh

Compiled distribution package

  1. Extract the archive.
    tar -xvzf flow-*-linux.tar.gz
  2. run install script as root; this will proceed a system-wide installation into /usr/local.
    cd flow-*-linux
    sudo ./install

You can override installation paths using environment variables.

  • BINPATH: where the script will be placed, /usr/local/bin by default.
  • SHAREPATH: where support files will be placed, /usr/local/share by default.
  • USRMANPATH: where manpage will be placed, $SHAREPATH/man/man1 by default.

This is how to install the script without root permissions.

BINPATH=~/bin SHAREPATH=~/.local/share ./install

Building from source

You will need the following dependencies:

  • GNU Make
  • rst2man (available in Docutils, e.g. apt-get install python-docutils or pip install docutils)
git clone https://github.com/internetguru/flow.git
cd flow
./configure && make && sudo compiled/install

You can specify following variables for make command which will affect default parameters of install script:

  • PREFIX: Installation prefix, /usr/local by default.
  • BINDIR: Location for flow script, $PREFIX/bin by default.

For example like this:

PREFIX=/usr make

See the man page for more information and examples.

Running unit tests

Testing the script requires a built 'flow' command and Bash Unit Testing Tool -- AKA the 'butt' command.

butt ~/flow/test/test.butt

Contributing

Pull requests are welcome. Don't hesitate to contribute.

Copyright

Copyright © 2016--2023 Internet Guru

This software is licensed under the CC BY-NC-SA license. There is NO WARRANTY, to the extent permitted by law. See the LICENSE file.

For commercial use, a nominal fee may be applicable based on the company size and the nature of their product. In many instances, this could result in no fees being charged at all. Please contact us at [email protected] for further information.

Please do not hesitate to reach out to us for inquiries related to seminars, workshops, training, integration, support, custom development, and additional services. We are more than happy to assist you.

Donation

If you find this script useful, please consider making a donation to support its developers. We appreciate any contributions, no matter how small. Donations help us to dedicate more time and resources to this project, including covering our infrastructure expenses.

PayPal Donation

Please note that we are not a tax-exempt organization and cannot provide tax deductions for your donation. However, for donations exceeding $500, we would like to acknowledge your contribution on project's page and in this file (including the man page).

Thank you for your continued support!

Honored donors

Alternatives