main: check that code is formatted in unit test
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
parent
39e0b6dade
commit
4e9e5dad09
2 changed files with 48 additions and 1 deletions
2
Makefile
2
Makefile
|
|
@ -10,7 +10,7 @@ MAKEFLAGS += --no-print-directory
|
|||
generate-version-and-build:
|
||||
@export GIT_CEILING_DIRECTORIES="$(realpath $(CURDIR)/..)" && \
|
||||
tag="$$(git describe --dirty 2>/dev/null)" && \
|
||||
ver="$$(printf 'package main\nconst Version = "%s"\n' "$$tag")" && \
|
||||
ver="$$(printf 'package main\n\nconst Version = "%s"\n' "$$tag")" && \
|
||||
[ "$$(cat version.go 2>/dev/null)" != "$$ver" ] && \
|
||||
echo "$$ver" > version.go && \
|
||||
git update-index --assume-unchanged version.go || true
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue