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

feat: terramate generate should not overwrite files that are not terramate managed #134

Merged
merged 8 commits into from
Jan 5, 2022

Conversation

katcipis
Copy link
Contributor

@katcipis katcipis commented Jan 4, 2022

For now using a perfect match with the generated header as a way to detect if the file is a terramate generated file or not. If it is not a terramate generated file now we fail generation for the specific stack + file remains unchanged.

@katcipis katcipis requested a review from i4ki January 4, 2022 17:24
@katcipis katcipis self-assigned this Jan 4, 2022
@codecov-commenter
Copy link

Codecov Report

Merging #134 (efe622f) into main (0012dde) will increase coverage by 0.06%.
The diff coverage is 85.41%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #134      +/-   ##
==========================================
+ Coverage   74.29%   74.35%   +0.06%     
==========================================
  Files          29       29              
  Lines        3077     3108      +31     
==========================================
+ Hits         2286     2311      +25     
- Misses        593      598       +5     
- Partials      198      199       +1     
Flag Coverage Δ
tests 74.35% <85.41%> (+0.06%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
test/sandbox/sandbox.go 83.56% <83.33%> (+0.70%) ⬆️
generate/generate.go 87.50% <86.66%> (-0.82%) ⬇️
git/git.go 65.89% <0.00%> (-0.52%) ⬇️

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 0012dde...efe622f. Read the comment docs.

@katcipis katcipis marked this pull request as ready for review January 4, 2022 17:26
Copy link
Contributor

@mariux mariux left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@katcipis katcipis merged commit b93c2b4 into main Jan 5, 2022
@katcipis katcipis deleted the katcipis-avoid-overwriting-non-generated-files branch January 5, 2022 09:16
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.

3 participants