diff options
author | Johnny Willemsen <jwillemsen@remedy.nl> | 2020-01-17 15:35:03 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-17 15:35:03 +0100 |
commit | 4065ae9592e4d914d404d1b7e03223c8291d0a20 (patch) | |
tree | 8e931ba811c9374bb7044b3474de3f672ba1aa70 | |
parent | 314d3ed8af0e514f747aa2e2d2fc5f152be1c936 (diff) | |
parent | d109e9f7982997ba6a2047ddac4b6576bd51e16f (diff) | |
download | ATCD-4065ae9592e4d914d404d1b7e03223c8291d0a20.tar.gz |
Merge pull request #1025 from jwillemsen/jwi-mpctag
Add Latest_ACETAO tag to MPC
-rwxr-xr-x | ACE/bin/make_release.py | 70 |
1 files changed, 50 insertions, 20 deletions
diff --git a/ACE/bin/make_release.py b/ACE/bin/make_release.py index 8415b2185b5..b3f8ce26523 100755 --- a/ACE/bin/make_release.py +++ b/ACE/bin/make_release.py @@ -117,6 +117,19 @@ def ex (command): print "ERROR: Nonzero return value from " + command raise Exception +def ex_failureok (command): + from os import system + global opts + vprint ("Executing " + command) + + if not opts.take_action: + print "Executing " + command + return + + status = system(command) + if status != 0: + print "WARNING: Nonzero return value from " + command + ### # Checks that the users environment is sane. # @@ -521,30 +534,30 @@ def get_comp_versions (component): # str (comp_versions[component + "_minor"]) -def update_latest_tag (which, branch): +def update_latest_tag (product, which, branch): """ Update one of the Latest_* tags externals to point the new release """ global opts tagname = "Latest_" + which # Remove tag locally vprint ("Removing tag %s" % (tagname)) - ex ("cd $DOC_ROOT/ACE_TAO && git tag -d " + tagname) + ex_failureok ("cd $DOC_ROOT/" + product + " && git tag -d " + tagname) vprint ("Placing tag %s" % (tagname)) - ex ("cd $DOC_ROOT/ACE_TAO && git tag -a " + tagname + " -m\"" + tagname + "\"") + ex ("cd $DOC_ROOT/" + product + " && git tag -a " + tagname + " -m\"" + tagname + "\"") -def push_latest_tag (which, branch): +def push_latest_tag (product, which, branch): """ Update one of the Latest_* tags externals to point the new release """ global opts tagname = "Latest_" + which if opts.push: - # Remove tag in the remote orgin - ex ("cd $DOC_ROOT/ACE_TAO && git push origin :refs/tags/" + tagname) + # Remove tag in the remote origin + ex_failureok ("cd $DOC_ROOT/" + product + " && git push origin :refs/tags/" + tagname) vprint ("Pushing tag %s" % (tagname)) - ex ("cd $DOC_ROOT/ACE_TAO && git push origin " + tagname) + ex ("cd $DOC_ROOT/" + product + " && git push origin " + tagname) def tag (): """ Tags the DOC and MPC repositories for the version and push that remote """ @@ -564,17 +577,23 @@ def tag (): # Update latest tag if opts.release_type == "major": - update_latest_tag ("Major", tagname) - update_latest_tag ("Minor", tagname) - update_latest_tag ("Beta", tagname) - update_latest_tag ("Micro", tagname) + update_latest_tag ("ACE_TAO", "Major", tagname) + update_latest_tag ("ACE_TAO", "Minor", tagname) + update_latest_tag ("ACE_TAO", "Beta", tagname) + update_latest_tag ("ACE_TAO", "Micro", tagname) + update_latest_tag ("MPC", "ACETAO_Major", tagname) + update_latest_tag ("MPC", "ACETAO_Minor", tagname) + update_latest_tag ("MPC", "ACETAO_Micro", tagname) elif opts.release_type == "minor": - update_latest_tag ("Minor", tagname) - update_latest_tag ("Beta", tagname) - update_latest_tag ("Micro", tagname) + update_latest_tag ("ACE_TAO", "Minor", tagname) + update_latest_tag ("ACE_TAO", "Beta", tagname) + update_latest_tag ("ACE_TAO", "Micro", tagname) + update_latest_tag ("MPC", "ACETAO_Minor", tagname) + update_latest_tag ("MPC", "ACETAO_Micro", tagname) elif opts.release_type == "micro": - update_latest_tag ("Beta", tagname) - update_latest_tag ("Micro", tagname) + update_latest_tag ("ACE_TAO", "Beta", tagname) + update_latest_tag ("ACE_TAO", "Micro", tagname) + update_latest_tag ("MPC", "ACETAO_Micro", tagname) else: vprint ("Placing tag %s on ACE_TAO" % (tagname)) vprint ("Placing tag %s on MPC" % (tagname)) @@ -602,12 +621,23 @@ def push (): # Update latest tag if opts.release_type == "major": - push_latest_tag ("Major", tagname) + push_latest_tag ("ACE_TAO", "Major", tagname) + push_latest_tag ("ACE_TAO", "Minor", tagname) + push_latest_tag ("ACE_TAO", "Beta", tagname) + push_latest_tag ("ACE_TAO", "Micro", tagname) + push_latest_tag ("MPC", "ACETAO_Major", tagname) + push_latest_tag ("MPC", "ACETAO_Minor", tagname) + push_latest_tag ("MPC", "ACETAO_Micro", tagname) elif opts.release_type == "minor": - push_latest_tag ("Minor", tagname) + push_latest_tag ("ACE_TAO", "Minor", tagname) + push_latest_tag ("ACE_TAO", "Beta", tagname) + push_latest_tag ("ACE_TAO", "Micro", tagname) + push_latest_tag ("MPC", "ACETAO_Minor", tagname) + push_latest_tag ("MPC", "ACETAO_Micro", tagname) elif opts.release_type == "micro": - push_latest_tag ("Beta", tagname) - push_latest_tag ("Micro", tagname) + push_latest_tag ("ACE_TAO", "Beta", tagname) + push_latest_tag ("ACE_TAO", "Micro", tagname) + push_latest_tag ("MPC", "ACETAO_Micro", tagname) else: vprint ("Pushing tag %s on ACE_TAO" % (tagname)) vprint ("Pushing tag %s on MPC" % (tagname)) |