ModischFabrications/CutSolver

Autolabel versions

ModischFabrications opened this issue · 8 comments

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.

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

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

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

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 #37 for some references)
  3. write script that increases version in file and tags git commit

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.