Use templates for files depending on TZ value #333
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is my proposal to use templates instead of to modify repository files to configure TZ.
All repository files that would be changed by
tz.sh
script have been renamed adding.template
, and thentz.sh
script has been changed to create them from templates usingenvsubst
command. After this change, to upgrade to a new version,git pull
command should be run before to runupgrade.sh
script.The
upgrade.sh
has been update to manage the case where it is started from an old version before this change: it will revert the files depending on TZ value before to make the pull (as usual), so that no conflicts will be raised, and then it recreates them from templates starting the newtz.sh
script.Files
VERSION
andtz
have been removed from the repository and used only for local configuration.The version is now retrieved with the command
git describe --tag --dirty=-custom
and saved in the fileVERSION
bysetup.sh
andupgrade.sh
scripts to make a comparison with repository version during next updates.In
upgrade.sh
script I have added a reference to a future tagv2.9.11
supposing it will be added if this PR will be approved and merged: indeed it should be changed if the tag will be different.Since I'm using
podman
instead ofdocker
, I have not tested the changes tosetup.sh
script, while I have testedtz.sh
script and theupgrade.sh
script for the case the upgrade is started from an old version.Sorry for this.