mirror of
https://github.com/slsdetectorgroup/aare.git
synced 2026-02-19 23:28:40 +01:00
updated version and version script
This commit is contained in:
@@ -8,11 +8,12 @@ import sys
|
|||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
|
from pathlib import Path
|
||||||
|
|
||||||
from packaging.version import Version, InvalidVersion
|
from packaging.version import Version, InvalidVersion
|
||||||
|
|
||||||
|
|
||||||
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
|
SCRIPT_DIR = Path(__file__).absolute().parent.parent
|
||||||
|
|
||||||
def is_integer(value):
|
def is_integer(value):
|
||||||
try:
|
try:
|
||||||
@@ -46,7 +47,8 @@ def get_version():
|
|||||||
|
|
||||||
|
|
||||||
def write_version_to_file(version):
|
def write_version_to_file(version):
|
||||||
version_file_path = os.path.join(SCRIPT_DIR, "VERSION")
|
version_file_path = SCRIPT_DIR/"VERSION"
|
||||||
|
print(version_file_path)
|
||||||
with open(version_file_path, "w") as version_file:
|
with open(version_file_path, "w") as version_file:
|
||||||
version_file.write(version)
|
version_file.write(version)
|
||||||
print(f"Version {version} written to VERSION file.")
|
print(f"Version {version} written to VERSION file.")
|
||||||
|
|||||||
Reference in New Issue
Block a user