-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bump version, bundle with Python and update prefs demo image
- Loading branch information
Showing
5 changed files
with
33 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# This file must be run from the repository root. | ||
|
||
projectName = "mouse_strafing" | ||
additionalDirectories = [] | ||
additionalFiles = ["LICENSE"] | ||
|
||
def getVersion(): | ||
import re | ||
with open("__init__.py", mode="r") as f: | ||
m = re.compile(r"""^\s*"version"\s*:\s*\(\s*(?P<major>\d+)\s*,\s*(?P<minor>\d+)\s*(,\s*(?P<patch>\d+)\s*)?\)\s*,?\s*$""", re.MULTILINE).search(f.read()) | ||
if m.group("patch") != None: | ||
return f'{m.group("major")}.{m.group("minor")}.{m.group("patch")}' | ||
else: | ||
return f'{m.group("major")}.{m.group("minor")}' | ||
|
||
if __name__ == "__main__": | ||
import zipfile | ||
from pathlib import Path | ||
zipFileName = f"{projectName}-{getVersion()}.zip" | ||
print(f"Writing {zipFileName}...") | ||
with zipfile.ZipFile(zipFileName, "w", zipfile.ZIP_DEFLATED) as zf: | ||
for dir in additionalDirectories: | ||
for path in Path(dir).rglob("*"): | ||
print(f"Adding {path} as {path.as_posix()}") | ||
zf.write(path, path.as_posix()) | ||
for path in Path(".").glob("*.py"): | ||
print(f"Adding {path} as {path.as_posix()}") | ||
zf.write(path, path.as_posix()) | ||
for fileName in additionalFiles: | ||
print(f"Adding {fileName} as {fileName}") | ||
zf.write(fileName, fileName) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file was deleted.
Oops, something went wrong.