Skip to content

Bumpster is a powerful utility for automating semantic version management.

License

Notifications You must be signed in to change notification settings

phoenixweiss/Bumpster

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bumpster

    _____                                 __
   / _  / __  __ ____ ___   ____   _____ / /_ ___   _____
  / __  |/ / / // __ `__ \ / __ \ / ___// __// _ \ / ___/
 / /_/ // /_/ // / / / / // /_/ /(__  )/ /_ / ___// /
/_____/ \__,_//_/ /_/ /_// .___//____/ \__/ \___//_/
                        /_/

RUSSIAN VERSION

Bumpster is a powerful utility for automating semantic version management. The name combines "bump" and "buster", highlighting its ability to quickly and efficiently handle version bumps for your software projects.

Key Features

  • Supports automatic version bumping for major, minor, and patch updates.
  • Works seamlessly with Git for release management without requiring git-flow.
  • Configurable branch names for master and develop.
  • Feature branch creation and closing with customizable behavior.
  • Local and global configuration files for flexibility.
  • Optional logging for all operations.
  • Minimal footprint: installed in ~/.bumpster.
  • Easy removal: delete the .bumpster directory to uninstall.
  • Cross-platform compatibility (Linux, macOS, and Git Bash on Windows).
  • Supports optional synchronization of the VERSION file with package.json.

Installation

Install Bumpster with a single command:

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/phoenixweiss/Bumpster/main/install.sh)"

This installs Bumpster in your home directory under ~/.bumpster.

After installation, add Bumpster to your PATH:

echo 'export PATH="$HOME/.bumpster/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc

For Git Bash on Windows:

echo 'export PATH="$HOME/.bumpster/bin:$PATH"' >> ~/.bash_profile
source ~/.bash_profile

Usage

Bumping Versions

Bump major version:

bumpster --major
# or
bump -M

Bump minor version:

bumpster --minor
# or
bump -m

Bump patch version:

bumpster --patch
# or
bump -p

Synchronizing with package.json

Bumpster supports optional synchronization between the VERSION file and package.json. When enabled, updating the version with bump will automatically synchronize the version in package.json. If package.json is not found, the operation is skipped with a log message.

Example Configuration:

SYNC_WITH_PACKAGE_JSON="true"

Example Usage:

  • VERSION updated to 1.0.0

  • package.json updated with the same version:

    {
      "version": "1.0.0"
    }

Display Version

To display the current version of Bumpster:

bumpster --version
# or
bump -v

Display Help

For help and available options:

bumpster --help
# or
bump -h

Updating Bumpster

Update Bumpster to the latest version:

bumpster --update
# or
bump -u

Customizing Branch Names

You can specify custom branch names by providing a configuration file or environment variables. Default branch names are main and dev.

Example configuration in .bumpsterrc:

# ~/.bumpsterrc or ./project/.bumpsterrc
GIT_MASTER_BRANCH="main"
GIT_DEVELOP_BRANCH="dev"
...

AFTER_BUMP_BRANCH option

This option allows you to specify the branch to switch to after a version bump. By default, it switches to the main branch. If the specified branch does not exist, it falls back to the default branch.

Example:

AFTER_BUMP_BRANCH="dev"

Checking Repository Status

To check the current repository status:

bumpster --status
# or
bump -s

This displays:

  • Current branch.
  • Number of uncommitted changes.
  • Number of unpushed commits.

Creating a Local Configuration File

Generate a local .bumpsterrc configuration file in your project:

bumpster --create-local-config
# or
bump -l

This guides you through an interactive setup process.

Creating and Closing Feature Branches

Create a feature branch:

bumpster --create-feature
# or
bump -f

Close the current feature branch:

bumpster --close-feature
# or
bump -c

When closing a feature branch, changes are merged into the development branch, and the feature branch is optionally deleted based on configuration.

Configuration

Bumpster uses configuration files (.bumpsterrc) to customize its behavior. It supports two types of configuration files:

  • Global Configuration: Located in ~/.bumpsterrc.
  • Local Configuration: Located in the project directory (./.bumpsterrc). Local configurations override global ones.

Example Configuration

# ~/.bumpsterrc or ./project/.bumpsterrc
GIT_MASTER_BRANCH="main"
GIT_DEVELOP_BRANCH="dev"
ENABLE_LOGGING="true"
LOG_FILE="bumpster.log"
DELETE_FEATURE_BRANCH_AFTER_MERGE="false"
ASK_BEFORE_DELETING_FEATURE_BRANCH="true"
SYNC_WITH_PACKAGE_JSON="true"
AFTER_BUMP_BRANCH="dev"

Requirements

Before using Bumpster, ensure you have an initialized Git repository.

Uninstalling Bumpster

To completely remove Bumpster, delete the ~/.bumpster directory:

rm -rf ~/.bumpster

Author

Created and maintained by PAVEL TKACHEV (phoenixweiss).

License

Bumpster is open-source software available under the MIT license.

About

Bumpster is a powerful utility for automating semantic version management.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages