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