Fix release

This commit is contained in:
Paul Nameless 2021-04-22 11:12:47 +03:00
parent 6ee5041c26
commit 5df6c65763
2 changed files with 10 additions and 8 deletions

2
make
View file

@ -28,7 +28,7 @@ case $ARG in
NEW_VERSION=$(echo $CURRENT_VERSION | awk -F. '{print $1 "." $2+1 "." $3}')
echo New version $NEW_VERSION
sed -i '' 's|$CURRENT_VERSION|$NEW_VERSION|g' tg/__init__.py
sed -i '' "s|$CURRENT_VERSION|$NEW_VERSION|g" tg/__init__.py
git add -u tg/__init__.py
git commit -m "Release v$NEW_VERSION"

View file

@ -42,8 +42,17 @@ def run(tg: Tdlib, stdscr: window) -> None:
controller.draw()
def parse_args():
import sys
if len(sys.argv) > 1 and sys.argv[1] in ("-v", "--version"):
import tg
print("Terminal Telegram client")
print("Version:", tg.__version__)
exit(0)
def main() -> None:
parse_args()
utils.cleanup_cache()
tg = Tdlib(
api_id=config.API_ID,
@ -63,11 +72,4 @@ def main() -> None:
if __name__ == "__main__":
import sys
if len(sys.argv) > 1 and sys.argv[1] in ("-v", "--version"):
import tg
print("Terminal Telegram client")
# print("Version:", tg.__version__)
print("Version:", tg.__version__)
exit(0)
main()