-
-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #29 from SenZmaKi/v2.1.4
V2.1.4
- Loading branch information
Showing
26 changed files
with
261 additions
and
151 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,4 +12,5 @@ marin.py | |
setups | ||
build | ||
dist | ||
.scraps/ | ||
crap.py |
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,56 @@ | ||
from io import TextIOWrapper | ||
import os | ||
import subprocess | ||
|
||
PREV_VERSION = "2.1.3" | ||
NEW_VERSION = "2.1.4" | ||
FILES_PATHS = [ | ||
"pyproject.toml", | ||
"senpwai/utils/static.py", | ||
"setup.iss", | ||
"setup_senpcli.iss", | ||
] | ||
|
||
|
||
def log_error(msg: str) -> None: | ||
print(f"[-] Error: {msg}") | ||
|
||
|
||
def log_info(msg: str) -> None: | ||
print(f"[+] Info: {msg}") | ||
|
||
|
||
def log_warning(msg: str) -> None: | ||
print(f"[!] Warning: {msg}") | ||
|
||
|
||
def truncate(file: TextIOWrapper, content: str) -> None: | ||
file.seek(0) | ||
file.write(content) | ||
file.truncate() | ||
|
||
|
||
def main() -> None: | ||
log_info(f"Bumping version from {PREV_VERSION} -> {NEW_VERSION}\n") | ||
for file_path in FILES_PATHS: | ||
if not os.path.isfile(file_path): | ||
log_error(f'"{file_path}" not found') | ||
continue | ||
with open(file_path, "r+") as f: | ||
content = f.read() | ||
new_content = content.replace(PREV_VERSION, NEW_VERSION) | ||
if new_content == content: | ||
if NEW_VERSION in new_content: | ||
log_warning( | ||
f'Failed to find previous version in "{file_path}" but the new version is in it' | ||
) | ||
else: | ||
log_error(f'Failed to find previous version in "{file_path}"') | ||
continue | ||
truncate(f, new_content) | ||
log_info(f'Bumped version in "{file_path}"') | ||
subprocess.run("git diff") | ||
|
||
|
||
if __name__ == "__main__": | ||
main() |
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[tool.poetry] | ||
name = "senpwai" | ||
version = "2.1.3" | ||
version = "2.1.4" | ||
description = "A desktop app for tracking and batch downloading anime" | ||
authors = ["SenZmaKi <[email protected]>"] | ||
license = "GPL v3" | ||
|
@@ -9,7 +9,7 @@ include = ["senpwai/assets"] | |
packages = [{ include = "senpwai" }, { include = "senpcli", from = "senpwai" }] | ||
exclude = ["src/**/test.py"] | ||
repository = "https://github.com/SenZmaKi/Senpwai" | ||
documentation = "https://github.com/SenZmaKi/Senpwai/blob/master/docs" | ||
documentation = "https://github.com/SenZmaKi/Senpwai/blob/master/README.md" | ||
keywords = [ | ||
"anime", | ||
"app", | ||
|
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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
from .hls import * # noqa F403 | ||
from .main import * # noqa F403 | ||
from .constants import GOGO # noqa F401 | ||
from .hls import * # noqa F403 | ||
from .main import * # noqa F403 | ||
from .constants import GOGO # noqa F401 |
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 |
---|---|---|
@@ -1,2 +1,2 @@ | ||
from .main import * # noqa: F403 | ||
from .constants import PAHE # noqa: F401 | ||
from .main import * # noqa: F403 | ||
from .constants import PAHE # noqa: F401 |
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
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
Oops, something went wrong.