Allow writing the `salt/_version.py file because we don't upload the .git` directory for CI

This commit is contained in:
Pedro Algarvio 2021-06-30 16:22:08 +01:00 committed by Gareth J. Greenaway
parent 11d5c08af4
commit 248222070b

View file

@ -302,8 +302,9 @@ class WriteSaltVersion(Command):
):
# Write the version file
if getattr(self.distribution, "salt_version_hardcoded_path", None) is None:
print("This command is not meant to be called on it's own")
exit(1)
self.distribution.salt_version_hardcoded_path = SALT_VERSION_HARDCODED
sys.stderr.write("This command is not meant to be called on it's own\n")
sys.stderr.flush()
if not self.distribution.with_salt_version:
salt_version = (