mirror of
https://gitlab.com/square-game-liberation-front/F.E.I.S.git
synced 2025-02-28 23:41:33 +01:00
Add timestamp info in windows release info
This commit is contained in:
parent
82e6a023fb
commit
040e81c57e
@ -1,12 +1,14 @@
|
|||||||
"""Run this after you've compiled FEIS"""
|
"""Run this after you've compiled FEIS"""
|
||||||
|
|
||||||
import argparse
|
import argparse
|
||||||
|
import datetime
|
||||||
import shutil
|
import shutil
|
||||||
import subprocess
|
import subprocess
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
parser = argparse.ArgumentParser()
|
parser = argparse.ArgumentParser()
|
||||||
parser.add_argument("release_name")
|
parser.add_argument("release_name")
|
||||||
|
parser.add_argument("--timestamp", action="store_true")
|
||||||
parser.add_argument("--build-dir", type=Path, default=Path("build"))
|
parser.add_argument("--build-dir", type=Path, default=Path("build"))
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
|
||||||
@ -23,4 +25,15 @@ subprocess.run([
|
|||||||
"-f", release_folder / "FEIS.exe"
|
"-f", release_folder / "FEIS.exe"
|
||||||
])
|
])
|
||||||
|
|
||||||
shutil.make_archive(args.release_name, "zip", ".", release_folder)
|
archive_name = args.release_name
|
||||||
|
|
||||||
|
if args.timestamp:
|
||||||
|
timestamp = datetime.datetime.utcnow().strftime("%Y%m%dT%H%M%S")
|
||||||
|
archive_name = f"{args.release_name}+{timestamp}"
|
||||||
|
|
||||||
|
shutil.make_archive(
|
||||||
|
archive_name,
|
||||||
|
"zip",
|
||||||
|
".",
|
||||||
|
release_folder
|
||||||
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user