Debian Codegraph @

script/bump

raw
1 #!/usr/bin/env bash
2
3 set -exuo pipefail
4
5 # Parse options.
6 version="$1"
7
8 # Check repo is not dirty.
9 git diff
10 test -z "$(git status --porcelain)"
11
12 # Start new branch.
13 branch="release-${version}"
14 git checkout -b "${branch}"
15
16 # Bump version.
17 go run ./internal/tools/release bump "${version}"
18
19 # Reserve DOI.
20 go run ./internal/tools/release reservedoi
21
22 # Rerun code generation.
23 ./script/generate
24
25 # Create a commit.
26 git add -u
27 git commit -m "all: release ${version}"