From 0268464d60467e6595026bd758e67ed03bb30cc2 Mon Sep 17 00:00:00 2001 From: Daniel Lemire Date: Tue, 30 Jul 2024 15:47:20 -0400 Subject: [PATCH] amal. automation --- tools/release.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tools/release.py b/tools/release.py index 0fa36031..2db22eb3 100755 --- a/tools/release.py +++ b/tools/release.py @@ -100,7 +100,7 @@ def topaddedversionstring(major, minor, rev): print(versionfile + " modified") from pathlib import Path scriptlocation = os.path.dirname(os.path.abspath(__file__)) -projectlocation = Path(os.path.abspath(__file__)).parent.absolute() +projectlocation = Path(os.path.abspath(__file__)).parent.parent.absolute() amal_path = os.path.join(projectlocation, "amalgamation.sh") import fileinput @@ -144,8 +144,10 @@ def topaddedversionstring(major, minor, rev): for line in fileinput.input(doxygenfile, inplace=1, backup='.bak'): line = re.sub(r'PROJECT_NUMBER = "\d+\.\d+\.\d+','PROJECT_NUMBER = "'+newversionstring, line.rstrip()) print(line) -ret = subprocess.call(["bash", amal_path]) -if(ret != 0): - print("failed to update amalgamation") + + + +pipe = subprocess.Popen(["bash", amal_path], stdout=subprocess.PIPE, stderr=subprocess.STDOUT) +print( pipe.communicate()[0].decode().strip() ) print("Please run the tests before issuing a release: "+scriptlocation + "/prereleasetests.sh \n") print("to issue release, enter \n git commit -a \n git push \n git tag -a v"+toversionstring(*newversion)+" -m \"version "+toversionstring(*newversion)+"\"\n git push --tags \n")