Closed seralekseenko closed 3 weeks ago
VERSION is needed to confirm exactly which bot you are talking to, none of specified problems are relevant if you are the only person deploying it. version file should be in .gitignore, removed from the GitHub and only exists in your machine from where you will be deploying it.
Can it be done better? 100% it can :)
For some reason I forgot to write my proposal. )) Here's my suggestion: a bot version can be generated each time based on a branch + commit.
It is forbidden to create a version from uncommitted files. We work only on Git!
The problem is in the
telegram_bot.py
→ there is the hard-code value of VERSIONThe
deploy_prod.sh
increments the VERSION based on what? Just on previous number? Okay, my previous number in VERSION file is3
. But in the code it is7
and in GitHub it is8
. Where is truth?When I do test runs of
deploy_prod.sh
during development, I get an uncontrolled increment of the VERSION number. I saw it when the version reached number 15))))Why do we need this VERSION at all? I think this is necessary both for testing and for better orientation when using the bot in direct work.