Load version from file

This commit is contained in:
Emil Dabrowski 2023-11-24 18:29:34 +01:00
parent cca5fafae6
commit 705c6610d2
2 changed files with 2 additions and 1 deletions

1
VERSION Normal file
View File

@ -0,0 +1 @@
0.2.2

View File

@ -1,8 +1,8 @@
#!/bin/bash
version="0.2.2"
script_dir=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
tmp_dir="$(mktemp -d --suffix=-web)"
version="$(head -n 1 "$script_dir/VERSION")"
cleanup () { rm -Rfv "$tmp_dir"; }
trap cleanup EXIT