Get src directory version, not project directory version.
This commit is contained in:
parent
4eb4e4ed64
commit
f6031eef7e
5
run.py
5
run.py
|
|
@ -29,6 +29,9 @@ def export_vcs(project_directory, install_path):
|
|||
cwd = Path(os.getcwd())
|
||||
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.
|
||||
mkdir_command = "mkdir -p {}".format(install_path)
|
||||
subprocess.run(mkdir_command, shell=True)
|
||||
|
|
@ -37,7 +40,7 @@ def export_vcs(project_directory, install_path):
|
|||
output_file = install_path + "/project_state.repos"
|
||||
|
||||
# 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)
|
||||
if result.returncode != 0:
|
||||
print("Failed to export software version. Return code: {}".format(result.returncode))
|
||||
|
|
|
|||
Loading…
Reference in New Issue