mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-08 10:51:15 -03:00
docs: removed dead code around FISH_BUILD_VERSION
Man pages used to be built by "build.rs" but now are built by a dependent "crates/build-man-pages/build.rs". This means that changing the environment of build.rs is ineffective. In future, "fn get_version" should probably be a part of "crates/build-helper/", so Cargo builds only need to compute the version once. Lack of this dependency means that "build-man-pages" does not pass FISH_BUILD_VERSION, which means that Sphinx will fall back to build_tools/git_version_gen.sh. This acceptable for now given that "build-man-pages" is not used in CMake builds.
This commit is contained in:
3
build.rs
3
build.rs
@@ -40,9 +40,6 @@ fn main() {
|
||||
// the source directory is the current working directory of the build script
|
||||
rsconf::set_env_value("FISH_BUILD_VERSION", version);
|
||||
|
||||
// safety: single-threaded code.
|
||||
unsafe { std::env::set_var("FISH_BUILD_VERSION", version) };
|
||||
|
||||
fish_build_helper::rebuild_if_embedded_path_changed("share");
|
||||
|
||||
let build = cc::Build::new();
|
||||
|
||||
@@ -122,11 +122,8 @@ 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.
|
||||
# From Cargo, or 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