Files
start-os/check-version.sh
Aiden McClelland b620e5319a add VERSION.txt
2022-11-29 09:43:54 -07:00

13 lines
346 B
Bash
Executable File

#!/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