Skip to content

Commit

Permalink
automating amal
Browse files Browse the repository at this point in the history
  • Loading branch information
lemire committed Jul 30, 2024
1 parent 11c1198 commit 6c39369
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions tools/release.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,10 @@ 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()
amal_path = os.path.join(projectlocation, "amalgamation.sh")

import fileinput

Expand Down Expand Up @@ -142,6 +144,8 @@ 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")
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 6c39369

Please sign in to comment.