Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: better version detection, ping() builtin improvements
- Distinguish between dev and release version by using IS_DEV_BUILD constant in tgpy/version.py. It's set to False only during release build process. - Allow version detection in docker container by using COMMIT_HASH constant in tgpy/version.py, which is set during docker build - utils.get_version() tries to get version from (in order): __version__ variable, commit hash from `git rev-parse`, commit hash from COMMIT_HASH constant - update() builtin now shows friendly message when: running in docker, git is not installed, installation method is unknown (not pypi package, not docker image, not git)
- Loading branch information
Showing
8 changed files
with
94 additions
and
20 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 |
---|---|---|
@@ -1,3 +1,2 @@ | ||
.git/ | ||
__pycache__ | ||
guide/site | ||
**/__pycache__/ | ||
guide/site |
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,3 @@ | ||
FROM tgpy-tmpimage:latest | ||
|
||
RUN sed -i "s/\(IS_DEV_BUILD *= *\).*/\1False/" tgpy/version.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
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,3 @@ | ||
__version__ = '0.4.1' | ||
IS_DEV_BUILD = True | ||
COMMIT_HASH = None |