#!/bin/bash #/ NAME #/ bump -- increments a semver in a file or in git tags #/ #/ SYNOPSIS #/ bump [major|minor|patch] #/ bump 1.2.3 #/ bump #/ without arguments is equivalent to 'bump patch' # figure out the project root under which bin, lib live shome="$(cd -P -- "$(dirname -- "$BASH_SOURCE")/.." && pwd -P)" # load a jason bourne library source "$shome/libexec/_jason" # parse the command-line DEFINE_boolean 'dirty' "$FLAGS_FALSE" 'force bumping in unclean work area' 'f' # entry point function main { require 'bump' if [[ "$#" = 0 ]]; then set -- patch fi bump_version "$FLAGS_dirty" "$@" } require sub "$BASH_SOURCE" "$@"