Skip to content

Commit b10af3c

Browse files
committed
New release!
1 parent 4f5c4ba commit b10af3c

File tree

4 files changed

+28
-18
lines changed

4 files changed

+28
-18
lines changed

CITATION.cff

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ authors:
55
- family-names: "Davis"
66
given-names: "Toby"
77
title: "LibRapid: Optimised Mathematics for C++"
8-
version: 0.6.13
9-
date-released: "2023-04-14"
8+
version: 0.7.0
9+
date-released: "2023-06-28"
1010
type: software
1111
url: "https://github.com/LibRapid/librapid"
1212
license: MIT

Doxyfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ PROJECT_NAME = "LibRapid"
3838
# could be handy for archiving the generated documentation or if some version
3939
# control system is used.
4040

41-
PROJECT_NUMBER = v0.6.13
41+
PROJECT_NUMBER = v0.7.0
4242

4343
# Using the PROJECT_BRIEF tag one can provide an optional one line description
4444
# for a project that appears at the top of each page and should give viewer a

scripts/setVersion.py

+23-13
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,19 @@
4040
print("[ ERROR ] -v and -M options cannot be used together")
4141
sys.exit(1)
4242

43-
newMajorVersion = args.major if args.major else currentMajorVersion
44-
newMinorVersion = args.minor if args.minor else currentMinorVersion
45-
newPatchVersion = args.patch if args.patch else str(int(currentPatchVersion) + 1)
43+
if args.version:
44+
# Validate version number
45+
if not regex.match("[0-9]+\.[0-9]+\.[0-9]+", args.version):
46+
print("[ ERROR ] Invalid version number")
47+
sys.exit(1)
48+
newMajorVersion = args.version.split(".")[0]
49+
newMinorVersion = args.version.split(".")[1]
50+
newPatchVersion = args.version.split(".")[2]
51+
else:
52+
newMajorVersion = args.major if args.major else currentMajorVersion
53+
newMinorVersion = args.minor if args.minor else currentMinorVersion
54+
newPatchVersion = args.patch if args.patch else str(int(currentPatchVersion) + 1)
55+
4656
print(f"New Version: v{newMajorVersion}.{newMinorVersion}.{newPatchVersion}\n\n")
4757

4858
# Write to version.txt
@@ -77,13 +87,13 @@
7787
citationFile.write(template)
7888
print("Written to CITATION.cff")
7989

80-
# Write to .hdoc.toml
81-
with open("tmp/hdocTemplate.toml", "r") as templateFile:
82-
template = templateFile.read()
83-
print("Loaded .hdoc.toml template")
84-
85-
with open("../.hdoc.toml", "w") as hdocFile:
86-
versionString = f"v{newMajorVersion}.{newMinorVersion}.{newPatchVersion}"
87-
template = template.replace("$${{ INSERT_VERSION_NUMBER_HERE }}$$", versionString)
88-
hdocFile.write(template)
89-
print("Written to .hdoc.toml")
90+
# # Write to .hdoc.toml
91+
# with open("tmp/hdocTemplate.toml", "r") as templateFile:
92+
# template = templateFile.read()
93+
# print("Loaded .hdoc.toml template")
94+
#
95+
# with open("../.hdoc.toml", "w") as hdocFile:
96+
# versionString = f"v{newMajorVersion}.{newMinorVersion}.{newPatchVersion}"
97+
# template = template.replace("$${{ INSERT_VERSION_NUMBER_HERE }}$$", versionString)
98+
# hdocFile.write(template)
99+
# print("Written to .hdoc.toml")

version.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
MAJOR 0
2-
MINOR 6
3-
PATCH 13
2+
MINOR 7
3+
PATCH 0

0 commit comments

Comments
 (0)