salt-extensions / salt-extension-copier

Create and maintain Salt extensions using Copier
https://salt-extensions.github.io/salt-extension-copier/
Apache License 2.0
10 stars 3 forks source link

[Feature] Automate some post-copy/update tasks #45

Closed lkubb closed 2 months ago

lkubb commented 3 months ago

After copying, the user needs to:

After updating, the user needs to:

Both should be automated, especially if we want RenovateBot auto-updates to work more reliably.

The task should probably be written in Python to be more robust. For inspiration, see https://github.com/salt-extensions/salt-extension-migrate (plumbum should be available in the Copier venv, need to double-check).

While the _copier_conf.operation variable is not yet available (hopefully soon), we could differentiate updates from copies using a ContextHook that checks for the presence of .copier-answers.yml, but waiting makes more sense (being able to use RenovateBot depends on the same variable).

We can just rely on the new migration syntax in 9.3.0.