mirror of
https://github.com/facebook/sapling.git
synced 2024-10-09 08:18:15 +03:00
remove .buckversion file from fbcode
Summary: Buck has not relied on the .buckversion file for a while now. Trying to clean up the number of configs at the root of the cell for buck. This diff attempts to remove .buckversion code referecnes. Instead of calling `cat .buckversion` to get the buckversion hash, you can call `buck --fast-version` which parses the `buck-java11` file without downloading buck. Alternatively, you can also do something like ` cat .buck-java11 | grep -o -E -e "[0-9a-f]{40}" | head -1` to get the buckversion hash. Reviewed By: DrMarcII Differential Revision: D28553844 fbshipit-source-id: ab90fa6a5e7467f6d5c11ffa9d0e10a03433975f
This commit is contained in:
parent
a292d63d7f
commit
a2e7c666a4
@ -55,12 +55,11 @@ def run_buck_command(
|
||||
# version of buck just to kill off buck. This is specific to Facebook's
|
||||
# deployment of buck, and has no impact on the behavior of the opensource
|
||||
# buck executable.
|
||||
# On Windows, "last" doesn't work, fallback to reading the .buckversion file.
|
||||
# On Windows, "last" doesn't work, fallback to reading the .buck-java11 file.
|
||||
if sys.platform != "win32":
|
||||
buckversion = "last"
|
||||
else:
|
||||
with open(os.path.join(path, ".buckversion"), "r") as f:
|
||||
buckversion = f.read().strip()
|
||||
buckversion = subprocess.run(["buck", "--version-fast"])
|
||||
|
||||
env = get_environment_suitable_for_subprocess()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user