Work on CI
This commit is contained in:
parent
d280d782ff
commit
960a954e02
|
@ -13,22 +13,20 @@ def get_version():
|
||||||
|
|
||||||
def set_version(version):
|
def set_version(version):
|
||||||
# modify the files to reflect the new version
|
# modify the files to reflect the new version
|
||||||
files = [os.abspath('./src/msspec/__init__.py'),
|
files = [os.path.abspath('./src/msspec/__init__.py'),
|
||||||
os.abspath('./src/msspec/msspecgui/__init__.py')]
|
os.path.abspath('./src/msspec/msspecgui/__init__.py'),
|
||||||
|
os.path.abspath("./VERSION")]
|
||||||
|
|
||||||
for f in files:
|
for f in files[:-1]:
|
||||||
with open(f, "w") as fd:
|
with open(f, "w") as fd:
|
||||||
f.write("# Auto-generated file, do not edit\n")
|
fd.write("# Auto-generated file, do not edit\n")
|
||||||
f.write(f"__version__ = \"{version}\"\n")
|
fd.write(f"__version__ = \"{version}\"\n")
|
||||||
f.write(f"__sha__ = \"$Id$\"\n")
|
fd.write(f"__sha__ = \"$Id$\"\n")
|
||||||
|
|
||||||
with open(os.abspath("./VERSION"), "w") as fd:
|
with open(files[-1], "w") as fd:
|
||||||
f.write(f"MsSpec-{version}")
|
fd.write(f"MsSpec-{version}")
|
||||||
|
|
||||||
# commit them
|
# commit them
|
||||||
files = [os.abspath('./src/msspec/__init__.py'),
|
|
||||||
os.abspath('./src/msspec/msspecgui/__init__.py'),
|
|
||||||
os.abspath("./VERSION")]
|
|
||||||
for f in files:
|
for f in files:
|
||||||
cmd = ['git', 'add', f]
|
cmd = ['git', 'add', f]
|
||||||
subprocess.run(cmd)
|
subprocess.run(cmd)
|
||||||
|
|
Loading…
Reference in New Issue