Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Autolabel versions #38

Closed
ModischFabrications opened this issue Apr 23, 2020 · 8 comments
Closed

Autolabel versions #38

ModischFabrications opened this issue Apr 23, 2020 · 8 comments

Comments

@ModischFabrications
Copy link
Owner

Track versions only in git, depend everything else on it.

  1. Git hook (pre commit?): If tag update version in file (simple >> ?)
  2. Python code loads variable from file
  3. Running instances can curl version file to warn with outdated answers.
@ModischFabrications
Copy link
Owner Author

https://pre-commit.com/ works as entry point

https://gitpython.readthedocs.io/en/stable/ is used to modify tags

@ModischFabrications
Copy link
Owner Author

can't tag in pre-commit, need post-commit at the earliest. Still can't really change python code from cli without risking integrity. -> python to git needed instead

@ModischFabrications
Copy link
Owner Author

won't work. Commit needs to exist to be tagged, pre-push is too late as it won't allow "staging" the tag as well. post-commit needed, see pre-commit/pre-commit#1411

@ModischFabrications
Copy link
Owner Author

Oh, btw, pycharm push won't respect pipenv shell, see pre-commit/pre-commit#1412

@ModischFabrications
Copy link
Owner Author

Use a common source for both versions instead?

  1. version as text file, read by app on startup
  2. fetch version file in github repo by running app to check internal version (would need requests or something similar, see evaluate size increase of wget #37 for some references)
  3. write script that increases version in file and tags git commit

@ModischFabrications
Copy link
Owner Author

@ModischFabrications
Copy link
Owner Author

ModischFabrications commented Apr 24, 2020

GitPython could push the new tag by itself, but pushing inside a push hook sounds like a really stupid idea, especially since the inner push tag refers to an outer push commit.

@ModischFabrications
Copy link
Owner Author

https://youtrack.jetbrains.com/issue/PY-12988 should make these prefixes obsolete

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant