mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-31 12:21:19 -03:00
docs: consistently use FISH_BUILD_VERSION_FILE
Commit2343a6b1f1passed the FISH_BUILD_VERSION_FILE to sphinx-manpages to remove the fish_indent dependency. For sphinx-docs this has been solved in another way ine895f96f8a(Do not rely on `fish_indent` for version in Sphinx, 2025-08-19). This is a needless inconsistency. Remove it. Use FISH_BUILD_VERSION_FILE whenever possible, since that means that a full build process only needs to call git_version_gen.sh once. Keep the fallback to git_version_gen.sh, in case someone calls sphinx-build directly.
This commit is contained in:
@@ -118,13 +118,15 @@ author = "fish-shell developers"
|
||||
issue_url = "https://github.com/fish-shell/fish-shell/issues"
|
||||
|
||||
# Parsing FISH-BUILD-VERSION-FILE is possible but hard to ensure that it is in the right place
|
||||
# fish_indent is guaranteed to be on PATH for the Pygments highlighter anyway
|
||||
if "FISH_BUILD_VERSION_FILE" in os.environ:
|
||||
# From Cmake
|
||||
f = open(os.environ["FISH_BUILD_VERSION_FILE"], "r")
|
||||
ret = f.readline().strip()
|
||||
elif "FISH_BUILD_VERSION" in os.environ:
|
||||
# From Cargo
|
||||
ret = os.environ["FISH_BUILD_VERSION"]
|
||||
else:
|
||||
# No build system.
|
||||
ret = subprocess.check_output(
|
||||
("../build_tools/git_version_gen.sh", "--stdout"), stderr=subprocess.STDOUT
|
||||
).decode("utf-8")
|
||||
|
||||
Reference in New Issue
Block a user