Skip to content

Commit

Permalink
fix: Reference to removed variable (#2634)
Browse files Browse the repository at this point in the history
Co-authored-by: Parva Shah <[email protected]>
Co-authored-by: Fabio Madge <[email protected]>
  • Loading branch information
3 people authored Aug 23, 2022
1 parent 3ae2167 commit b0a18bb
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions Scripts/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -253,10 +253,13 @@ def pack(args, releases):

def check_version_cs(args):
# Checking version.cs
for line in open(path.join(SOURCE_DIRECTORY,"version.cs")):
res = re.match(r'^\s*\[assembly:\s+AssemblyVersion\("([0-9]+.[0-9]+.[0-9]+).([0-9]+)"\)\]\s*$', line)
if res:
(v1, v2) = res.groups()
with open(path.join(SOURCE_DIRECTORY,"version.cs")) as fp:
match = re.search(r'\[assembly:\s+AssemblyVersion\("([0-9]+.[0-9]+.[0-9]+).([0-9]+)"\)\]', fp.read())
if match:
(v1, v2) = match.groups()
else:
flush("The AssemblyVersion attribute in version.cs could not be found.")
return False
now = time.localtime()
year = now[0]
month = now[1]
Expand All @@ -272,8 +275,7 @@ def check_version_cs(args):
flush("The version number in version.cs does not agree with the given version: " + hy + " vs. " + v1)
if (v2 != v3 or hy != v1):
return False
fp.close()
flush("Creating release files for release \"" + args.version + "\" and internal version information: "+ verline[qstart+1:qend])
flush("Creating release files for release \"" + args.version + "\" and internal version information: " + v1 + "." + v2)
return True

def parse_arguments():
Expand Down

0 comments on commit b0a18bb

Please sign in to comment.