Get src directory version, not project directory version.

This commit is contained in:
James Pace 2026-05-26 15:14:04 -04:00
parent 4eb4e4ed64
commit f6031eef7e
1 changed files with 4 additions and 1 deletions

5
run.py
View File

@ -29,6 +29,9 @@ def export_vcs(project_directory, install_path):
cwd = Path(os.getcwd()) cwd = Path(os.getcwd())
project_directory = cwd.parent.parent project_directory = cwd.parent.parent
# Find src directory from project directory.
src_directory = project_directory / "src"
# Make the install directory if it doesn't exist. # Make the install directory if it doesn't exist.
mkdir_command = "mkdir -p {}".format(install_path) mkdir_command = "mkdir -p {}".format(install_path)
subprocess.run(mkdir_command, shell=True) subprocess.run(mkdir_command, shell=True)
@ -37,7 +40,7 @@ def export_vcs(project_directory, install_path):
output_file = install_path + "/project_state.repos" output_file = install_path + "/project_state.repos"
# Now call vcs. # Now call vcs.
vcs_command = "vcs export --exact-with-tags {} > {}".format(project_directory, output_file) vcs_command = "vcs export --exact-with-tags {} > {}".format(src_directory, output_file)
result = subprocess.run(vcs_command, shell=True, capture_output=True) result = subprocess.run(vcs_command, shell=True, capture_output=True)
if result.returncode != 0: if result.returncode != 0:
print("Failed to export software version. Return code: {}".format(result.returncode)) print("Failed to export software version. Return code: {}".format(result.returncode))