Skip to content

Commit

Permalink
amal. automation
Browse files Browse the repository at this point in the history
  • Loading branch information
lemire committed Jul 30, 2024
1 parent 6c39369 commit 0268464
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions tools/release.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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")

0 comments on commit 0268464

Please sign in to comment.