Bump semver tag in git

There are a number of scripts and git aliases that allow you to bump a semver tag in git, but none of them completely suit my needs. Consequently, I wrote my own bash script to do exactly what I need for my own admittedly-simple workflows. #!/usr/bin/env bash set -eo pipefail USAGE_TEXT="Bump and tag the current repository using semantic versioning (https://semver.org/). Usage: git-bump [options] [major|minor|patch] Default: patch Options: -n|--no-update Don't update repository before tagging....

bash: set -euxo pipefail

#!/usr/bin/env bash set -euxo pipefail Explanations from the Bash Reference Manual: -e Exit immediately if a pipeline, which may consist of a single simple command, a list, or a compound command returns a non-zero status. -u Treat unset variables and parameters other than the special parameters ‘@’ or ‘*’, or array variables subscripted with ‘@’ or ‘*’, as an error when performing parameter expansion. An error message will be written to the standard error, and a non-interactive shell will exit....

I'm being stubborn

I’ve been writing a lot of Go code for the past few years and I have really come to appreciate the code generation patterns that Go developers use. In this case, the excellent Moq library to generate test doubles for unit tests. No third-party code is necessary to use these test doubles, which is an unusual joy nowadays with masses of transitive dependencies frequently required for anything interesting. One thing that has been bugging me for a while with moq is that in its documentation and generated code it calls these test doubles mocks when they are clearly stubs....

Diceware passphrase generator

There are many ways to generate passwords, and to avoid passwords in the first place (which you really should do), but I wanted a little practice in writing interactive bash scripts. So I chose to create a password generator based on the Diceware algorithm, even though I don’t carry any dice with me. Find of the day is the excellent gum tool that makes it easy to create pretty user interaction....