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

Preserve directory mtimes #27

Merged
merged 1 commit into from
Dec 7, 2020

Conversation

ekohl
Copy link
Contributor

@ekohl ekohl commented Nov 22, 2020

To make module building more idempotent, this copies directory mtimes after copying files. The result is that when removing the staging directory and creating another the mtimes will be the same.

Since creating or removing a file modifies a directory, it needs to happen after all files have been copied.

This can be beneficial when using rsync to deploy.

@ekohl ekohl requested review from a team as code owners November 22, 2020 15:36

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
To make module building more idempotent, this copies directory mtimes
after copying files. The result is that when removing the staging
directory and creating another the mtimes will be the same.

Since creating or removing a file modifies a directory, it needs to
happen after all files have been copied.

This can be beneficial when using rsync to deploy.
@ekohl ekohl force-pushed the preserve-directory-mtime branch from 9d45789 to d3b0a2c Compare November 22, 2020 15:54
@codecov-io
Copy link

codecov-io commented Nov 22, 2020

Codecov Report

Merging #27 (d3b0a2c) into master (955033e) will increase coverage by 0.56%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #27      +/-   ##
==========================================
+ Coverage   92.50%   93.06%   +0.56%     
==========================================
  Files           2        2              
  Lines         160      173      +13     
==========================================
+ Hits          148      161      +13     
  Misses         12       12              
Impacted Files Coverage Δ
lib/puppet/modulebuilder/builder.rb 92.98% <100.00%> (+0.57%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 955033e...d3b0a2c. Read the comment docs.

@carabasdaniel
Copy link
Contributor

Hi @ekohl,

Thank you for your contribution, this looks good.

@carabasdaniel carabasdaniel merged commit ca68a5e into puppetlabs:master Dec 7, 2020
@carabasdaniel carabasdaniel added the feature New feature or request label Dec 7, 2020
@ekohl ekohl deleted the preserve-directory-mtime branch January 18, 2021 15:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants