aboutsummaryrefslogtreecommitdiff
path: root/generate-version.sh (unfollow)
Commit message (Collapse)AuthorLines
2023-05-18slave: unset TERM_PROGRAM{,_VERSION}Daniel Eklöf-1/+0
Foot’s policy is to not set environment variables that identifies it (except the well-known and established `TERM` variable). We encourage applications to use terminfo to determine capabilities, or terminal queries, when available. Or, at least use terminal queries to detect the terminal and its version. Setting environment variables is a bad idea since they are inherited by all applications started by the terminal (which is the whole point). But, this includes other terminal emulators, making it very possible a terminal emulator gets mis-detected just because it was started from another terminal. Since there are a couple of terminal emulators that _do_ set TERM_PROGRAM and TERM_PROGRAM_VERSION, unset these environment variables to avoid being misdetected. Closes #1349
2023-03-20slave: set $TERM_PROGRAM and $TERM_PROGRAM_VERSION environment variablesCraig Barnes-0/+1
These are already being set by iTerm2, WezTerm, tmux and likely some others. Even though using yet more environment variables seems rather questionable, if we don't set these we run the risk of inheriting them from other terminals. See also: * https://gitlab.com/gnachman/iterm2/-/blob/97a6078df8e822da165e91737a01c0b9e115dd16/sources/PTYSession.m#L2568-2570 * https://github.com/tmux/tmux/blob/1d0f68dee9f71c504e03616fa472a408a6caa49b/environ.c#L263-L264 * https://github.com/search?q=TERM_PROGRAM&type=code
2022-02-04generate-version: exit early if argc is not 3Pranjal Kole-0/+5
Print usage information and exit if the number of arguments is not 3.
2021-10-11generate-version: handle git repo not having any tagsDaniel Eklöf-1/+8
2021-08-25meson: run generate_version.sh in a C localeDaniel Eklöf-1/+1
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-06-25generate-version: fix regression where a tagged version was parsed wrong1.8.0Daniel Eklöf-4/+5
The regexps didn’t work when the “extra” portion of “git describe” was missing.
2021-06-13generate-version: add a define for “extra” version informationDaniel Eklöf-4/+6
This will be set to “rrr-gNNNNNNN” when building from git, and the empty string otherwise.
2020-10-10selection: use appropriate check for PRIMARY pasteSergey Nazaryev-18/+3
Assume it could be a copy-paste typo. We should check PRIMARY, not CLIPBOARD. Without this fix, we can't use PRIMARY until we copy anything to CLIPBOARD.
2020-07-24csi: secondary DA: do not pretend we're xtermDaniel Eklöf-1/+8
Previously, our secondary DA response indicated a) VT420, b) an XTerm version number. Now, we indicate VT220 (which corresponds to the primary DA response), and we report foot's version number as MMmmpp. I.e major, minor and patch versions, using two digits. E.g. 1.4.2 is encoded as 010402
2020-03-06generate-version: check for .git directory in *src* dirDaniel Eklöf-1/+1
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.
2019-11-27generate-version: redirect *both* stdout and stderr to /dev/nullDaniel Eklöf-1/+1
2019-11-24generate-version: handle builds that aren't git clonesDaniel Eklöf-1/+1
2019-10-19meson: fix version generation from gitDaniel Eklöf-0/+38
run_command() was only run at configure time, meaning the generated version (that was passed on to the sources via -DFUZZEL_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)