Skip to content
Snippets Groups Projects
Commit ad8064b4 authored by Lorenzo Pagliai's avatar Lorenzo Pagliai
Browse files

[DEPLOY-CI] Fix on srcrev conf file in manifest

In the current implementation of Edgehog project, manifest
repositories do not have to contain SRCREV.conf files which are
instead in the conf/SRCREV.conf file of the meta-layer. For this reason
we want to avoid to throw an error when the file is not found
inside the manifest.
parent 35bc79c2
No related branches found
No related tags found
No related merge requests found
......@@ -316,9 +316,12 @@ def main():
manifest_integration["repo"].working_tree_dir, args.srcrev_file
)
logging.debug("Read manifest from: %s", srcrev_file_abs)
with open(srcrev_file_abs, "r", encoding="utf8") as fp:
srcrev = fp.read()
logging.debug(srcrev)
try:
with open(srcrev_file_abs, "r", encoding="utf8") as fp:
srcrev = fp.read()
logging.debug(srcrev)
except:
logging.debug("SRCREV.conf file not found on manifest")
for project_integration in project_integrations:
# Check if project integration belongs to this manifest branch
......@@ -372,10 +375,14 @@ def main():
fp.write(manifest)
manifest_integration["repo"].git.add(args.manifest_file)
logging.debug(manifest)
with open(srcrev_file_abs, "w", encoding="utf8") as fp:
fp.write(srcrev)
manifest_integration["repo"].git.add(args.srcrev_file)
logging.debug(srcrev)
try:
with open(srcrev_file_abs, "w", encoding="utf8") as fp:
fp.write(srcrev)
manifest_integration["repo"].git.add(args.srcrev_file)
logging.debug(srcrev)
except:
logging.debug("Not writing SRCREV.conf file since not found on manifest")
# ========================================================
# Squash all commits on the integration branch to one
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment