summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Ostrovsky <david@ostrovsky.org>2020-06-21 18:12:26 +0200
committerAntonio Barone <syntonyze@gmail.com>2021-06-09 10:43:07 +0300
commit79d48b70c6188914b7f7fa18cb73dce537f03270 (patch)
treef96456410d13ddc3eceb42cbe394ee635b33f50c
parent6ce7d261e18adffad25a17f11ec4895da23a24f8 (diff)
Bazel: Extend workspace status command to stamp jgit artifact
Also-by: Christian Aistleitner <christian@quelltextlich.at> Cherry-Picks: Ibe74e6de4ac0819c67dbd3ebb7008c3a716f3e06 Bug: Issue 14646 Change-Id: Ic49bfe5a5919474aba8859f3a843e5a39c6a2794
-rw-r--r--tools/workspace_status.py14
1 files changed, 8 insertions, 6 deletions
diff --git a/tools/workspace_status.py b/tools/workspace_status.py
index 86df519ed5..443c2f05b2 100644
--- a/tools/workspace_status.py
+++ b/tools/workspace_status.py
@@ -36,9 +36,11 @@ def revision(directory, parent):
print("STABLE_BUILD_GERRIT_LABEL %s" % revision(ROOT, ROOT))
-for d in os.listdir(os.path.join(ROOT, 'plugins')):
- p = os.path.join('plugins', d)
- if os.path.isdir(p):
- v = revision(p, ROOT)
- print('STABLE_BUILD_%s_LABEL %s' % (os.path.basename(p).upper(),
- v if v else 'unknown'))
+for kind in ['modules', 'plugins']:
+ kind_dir = os.path.join(ROOT, kind)
+ for d in os.listdir(kind_dir):
+ p = os.path.join(kind_dir, d)
+ if os.path.isdir(p):
+ v = revision(p, ROOT)
+ print('STABLE_BUILD_%s_LABEL %s' % (os.path.basename(p).upper(),
+ v if v else 'unknown'))