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

Use templates for files depending on TZ value #333

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

rcasta74
Copy link
Contributor

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 then tz.sh script has been changed to create them from templates using envsubst command. After this change, to upgrade to a new version, git pull command should be run before to run upgrade.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 new tz.sh script.

Files VERSION and tz 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 file VERSION by setup.sh and upgrade.sh scripts to make a comparison with repository version during next updates.

In upgrade.sh script I have added a reference to a future tag v2.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 of docker, I have not tested the changes to setup.sh script, while I have tested tz.sh script and the upgrade.sh script for the case the upgrade is started from an old version.
Sorry for this.

@jasonacox
Copy link
Owner

Thanks @rcasta74 - I'll take a look.

@jasonacox
Copy link
Owner

Hi @rcasta74 - I'm sorry for delay.

I'm having some heartburn with the change. It makes sense, but need to still validate on all platforms with docker (RPi, Linux, MacOS, Win) and think through any unintended side effects that could be presented to any of the older version (for upgrade.sh).

We will need to also resolve minor conflicts based to other changes, but those are minor.

If anyone else has validated this PR, please chime in here to help.

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

Successfully merging this pull request may close these issues.

2 participants