File: version-increment

package info (click to toggle)
construct 2.10.68%2Bdfsg1-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,812 kB
  • sloc: python: 11,793; makefile: 135
file content (20 lines) | stat: -rwxr-xr-x 399 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/usr/bin/python3.9

import construct
x,y,z = construct.version
z += 1

import arrow
date = arrow.utcnow().datetime

content = f"""
version = ({x},{y},{z})
version_string = "{x}.{y}.{z}"
release_date = "{date.year}.{date.month:02}.{date.day:02}"
""".lstrip()

with open("construct/version.py","wt") as f:
    f.write(content)

import os
os.system(f"git commit -a -m 'version uped to {x}.{y}.{z}'")