Description:
Add version calculation.
Commit status:
[Not Reviewed]
References:
Comments:
0 Commit comments 0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
Add another comment

r271:00fce07cc804 -

@@ -7,6 +7,7
7 7 import subprocess
8 8 import os
9 9 import pathlib
10 import datetime
10 11
11 12 template_directory = pathlib.Path("PackageTemplates/")
12 13 macos_template = template_directory / "isometric-park-template.app"
@@ -17,6 +18,22
17 18 destination_directory = pathlib.Path("isometric-park-fna/bin/")
18 19
19 20
21 start_date = datetime.datetime(2019, 1, 1)
22
23
24 def months_betweeen(start, end):
25 return ((end.year - start.year) * 12) + (end.month - start.month)
26
27
28 def create_version_string():
29 today = datetime.datetime.today()
30 months = months_betweeen(start_date, today) + 1
31
32 version_string = f"0.{months}.{today.strftime('%d')}"
33
34 print(f"Version string: {version_string}")
35
36
20 37 def make_linux(suffix="new"):
21 38 new_name = destination_directory / (linux_template.name[:-9] + "-" + suffix)
22 39 # shutil.rmtree(new_name)
@@ -160,6 +177,8
160 177 make_source(sys.argv[2])
161 178 else:
162 179 make_source()
180 elif command.lower() == "version":
181 create_version_string()
163 182 else:
164 183 pass
165 184
You need to be logged in to leave comments. Login now