Commit graph

7 commits

Author SHA1 Message Date
Daniel Eklöf
9a1371b96a
generate-version: handle git repo not having any tags 2021-10-11 20:21:07 +02:00
Daniel Eklöf
b8dd247111
meson: run generate_version.sh in a C locale
Previously, only the date command inside the script was run with
LC_TIME=C.

But there’s no reason to be that conservative; we absolutely do not
want _anything_ in that script to generate locale dependent output.
2021-08-25 19:03:32 +02:00
Daniel Eklöf
d68785eb2b
generate-version: check for .git directory in *src* dir
Instead of trying to run `git --rev-parse --is-inside-work-tree`,
check if there's a .git directory under the source directory.

This should fix an issue where we incorrectly decided we where in a
foot git clone when we're just a subdirectory under another
repository.
2020-03-06 22:16:33 +01:00
Daniel Eklöf
9fb3c58588
generate-version: redirect *both* stdout and stderr to /dev/null 2019-11-27 21:20:41 +01:00
Daniel Eklöf
6c12ea3811
generate-version: handle builds that aren't git clones 2019-11-24 14:00:21 +01:00
Daniel Eklöf
4250ae0a01
generate-version: conform to POSIX sh 2019-10-19 22:07:38 +02:00
Daniel Eklöf
c4f9168191
meson: fix version generation from git
run_command() was only run at configure time, meaning the generated
version (that was passed on to the sources via -DYAMBAR_VERSION)
became stale.

Fix by implementing a shell script that generates a header file, and
wrap this in a custom target that is run every time (but the generated
file is only updated when the version changes)
2019-10-19 21:47:21 +02:00