dnaka91 / cargo-hatch

Hatch new projects like a chick coming out of its egg
GNU Affero General Public License v3.0
7 stars 1 forks source link

Updating a template #12

Open ModProg opened 1 year ago

ModProg commented 1 year ago

We discussed this earlier, but I have a few ideas that should make this viable:

  1. from from either a tag e.g. "0.1" or from a commit sha 0c4a3.
  2. Modes for cleaning up files generated by from version a. force-clean: Delete all files that were created by from version b. try-clean: Check if any files created by from version were changed, if yes fail. c. partial-clean: Only delete all the files that were not changed
  3. Modes for generating new files a. force-gen: Replace existing files with newly generated ones b. try-gen: Fail if any files would be overwritten c. partial-gen: Only generate files that would not overwrite existing ones.
  4. Have combined modes, i.e. force, try, partial
  5. For values: a. have some form of input file b. just respecify all the values, as they might have changed from version to version as well.

With a vc project you can just use force and than have a look at the diff.

ModProg commented 1 year ago

This is probably a more complex problem, but if you are generally interested in this I'd do some investigating.