File: version-increment

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

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}'")