mirror of
https://github.com/TeamMidnightDust/BetterLeavesLite.git
synced 2025-12-14 19:55:08 +01:00
Dynamically update the copyright year
This commit is contained in:
Binary file not shown.
@@ -361,7 +361,7 @@ def writeMetadata(args):
|
||||
if isinstance(edition, list): edition = " ".join(args.edition)
|
||||
with open("./input/pack.mcmeta") as infile, open("pack.mcmeta", "w") as outfile:
|
||||
for line in infile:
|
||||
line = line.replace("${version}", args.version).replace("${edition}", edition)
|
||||
line = line.replace("${version}", args.version).replace("${edition}", edition).replace("${year}", str(time.localtime().tm_year))
|
||||
outfile.write(line)
|
||||
|
||||
# See https://stackoverflow.com/a/1855118
|
||||
|
||||
@@ -2,6 +2,6 @@
|
||||
"pack": {
|
||||
"pack_format": 15,
|
||||
"supported_formats": [15, 99],
|
||||
"description": "§2Version ${version} §a${edition}\n§e©Motschen 2024 | MIT Licence"
|
||||
"description": "§2Version ${version} §a${edition}\n§e©Motschen ${year} | MIT Licence"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user