Closed Angel0ffDeath closed 2 years ago
@neothematrix It seems no interest from anybody on this issue... Should I close it
nop, I'm working on it, it makes sense also to be able to properly version docker images, if you noticed I've already started tagging some commits
@neothematrix Ok. Appreciate that. And I have some ideas how to make the soft to go in next generation... i.e. if site changes - auto find what we need :).
@neothematrix - Wow perfect - now we have version 1.5.2... Keep going :)
yep, now versioning works properly, I just need to find the best way to insert it also in the python code (and keep it up to date)
@neothematrix Probably this will do the trick:
import requests response = requests.get("https://github.com/neothematrix/noip-renew/releases/latest") version = response.json()["name"]
If global variable VERSION = "" then run the above code and with subprocess.call use sed to alter locally the script, i.e. to change VERSION = "version" and print version in logger. If VERSION is not "" we don't run the above code....
Or you can alter the script from setup.sh:
curl --silent "https://github.com/neothematrix/noip-renew/releases/latest" | grep '"tag_name":' | sed -E 's/."([^"]+)"./\1/'
and again with sed alter python script
Or you can just hard code it in the script, but in this case you should manually change this with each release...
@neothematrix I have one more idea, but didn't tried it - you can use pre-commit and probably pre-merge-commit hooks to alter the script (i.e. to change the version) and maybe post-commit and post-merge-commit hooks to alter release tags
I do believe, finally, it is good idea to add version number and repo in python script and this info to be printed on screen and in log (regardless which debuglevel is used). This will prevent further misunderstandings and/or requests