commit 258f46aa0d767c6a3c3eec0200a0c9d19c31f4bc (patch)
parent e95763fee2cbd55fa3f1e937ba62789b1fbc257a
Author: Alex Karle <alex@karle.co>
Date: Mon, 25 May 2020 20:24:43 -0400
make: Add version.txt artifact to build area
With the rollout of preprod and prod, we need an easy way to know what
version the server is running. I thought about baking in a version
number in the server itself, but it's much easier and more informative
to just save off the git log from the HEAD at the time the release is
built.
Can be retrieved with a simple GET /version.txt
Diffstat:
1 file changed, 1 insertion(+), 0 deletions(-)
diff --git a/Makefile b/Makefile
@@ -28,6 +28,7 @@ build: .public.ts $(LIB_FILES) gloat.pl
rm -rf build
mkdir -p build
cp -a gloat.pl public lib build
+ git show HEAD --pretty=full -s | sed 's/\(Author\|Commit\): \([^<]\+\).*/\1: \2<redacted>/' > build/public/version.txt
@echo ">>> Build Success! <<<"
.PHONY: release