Skip to content

Instantly share code, notes, and snippets.

@mwnDK1402
Last active September 17, 2021 09:43
Show Gist options
  • Save mwnDK1402/b83b5739ea8e6a0c5c287844ff95a933 to your computer and use it in GitHub Desktop.
Save mwnDK1402/b83b5739ea8e6a0c5c287844ff95a933 to your computer and use it in GitHub Desktop.
# Check whether cocogitto is installed
if ! cog bump --help >/dev/null; then
>&2 echo 'error: please install cocogitto'
exit 1
fi
# Check whether cargo-bump is installed
if ! cargo bump --help >/dev/null; then
>&2 echo 'error: please install cargo-bump'
exit 1
fi
# Bump version
echo '+cog bump --auto'
cog bump --auto >/dev/null
# Include updated Cargo.lock file in commit
echo '+git add Cargo.lock'
git add Cargo.lock
echo '+git commit --amend --no-edit'
git commit --amend --no-edit >/dev/null
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment