add VERSION.txt

This commit is contained in:
Aiden McClelland
2022-11-25 15:45:39 -07:00
committed by Aiden McClelland
parent f12df8ded4
commit b620e5319a
3 changed files with 18 additions and 1 deletions

13
check-version.sh Executable file
View File

@@ -0,0 +1,13 @@
#!/bin/bash
FE_VERSION="$(cat frontend/package.json | grep -Po '"version":[ \t\n]*"\K[^"]*')"
# TODO: Validate other version sources - backend/Cargo.toml, backend/src/version/mod.rs
VERSION=$FE_VERSION
if ! [ -f ./VERSION.txt ] || [ "$(cat ./VERSION.txt)" != "$VERSION" ]; then
echo -n "$VERSION" > ./VERSION.txt
fi
echo -n ./VERSION.txt