shell scripts: shfmt
This commit is contained in:
parent
e393a36a65
commit
5aa28f74ee
2
Makefile
2
Makefile
@ -16,6 +16,8 @@ lint:
|
||||
go vet ./...
|
||||
staticcheck -f stylish ./...
|
||||
shellcheck $(SCRIPTS)
|
||||
shfmt $(SCRIPTS)
|
||||
git diff --exit-code
|
||||
|
||||
.INTERMEDIATE: coverage.out
|
||||
coverage.out: $(GODEPS)
|
||||
|
7
release
7
release
@ -1,12 +1,15 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
_err(){ >&2 echo "ERROR: $*"; exit 1; }
|
||||
_err() {
|
||||
echo >&2 "ERROR: $*"
|
||||
exit 1
|
||||
}
|
||||
|
||||
git status --porcelain | grep -q "" &&
|
||||
_err "working tree is dirty, commit your changes first."
|
||||
|
||||
[[ "$1" =~ ^v([0-9]+)\.([0-9]+)(\.([0-9]+))?(-rc([0-9]+))?$ ]] || \
|
||||
[[ "$1" =~ ^v([0-9]+)\.([0-9]+)(\.([0-9]+))?(-rc([0-9]+))?$ ]] ||
|
||||
_err "arg1 accepts the following formats: v1.0 v1.0.0 v1.0-rc1 v1.0.1-rc1"
|
||||
|
||||
git tag | grep -q "^$1$" &&
|
||||
|
Loading…
Reference in New Issue
Block a user