xen-troops / moulin

Moulin is meta build system that is capable of building multiple images at once
Apache License 2.0
2 stars 15 forks source link

git.py: Unlink checkout target from the repo dir #88

Closed Mishytca closed 11 months ago

Mishytca commented 11 months ago

Change the behavior of the git fetcher so that it doesn't apply the checkout operation again, when the repository root folder is changed manually by the user.

The git.py file has been modified. Сhanges were made to the gen_fetch function.

Previous dependency chain was:

With it the change of the folder by the user leads to a side-effect, as git_checkout_stamp file marker becomes 'dirty'.

This patch changes the dependency chain to:

With this approach change of the folder by the user does not affect the state of the artifact generated by the git_checkout rule.

Still, if the repository folder would be deleted, it will cause application of both git_clone and git_checkout operations.

With this patch, when the root directory of any git-fetcher related project is manually updated, the build system will not jump back to the branch, defined in the YAML file.

lorc commented 11 months ago

Fixes #44