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

fix: ACNA-1683 - dotFiles copied not renamed #195

Merged
merged 2 commits into from
Jun 8, 2022
Merged

Conversation

amulyakashyap09
Copy link
Contributor

@amulyakashyap09 amulyakashyap09 commented Jun 8, 2022

ACNA-1683 | dotFiles copied not renamed

Description

The files [_dot.env, _dot.gitignore] are copied into the project on create/init where they get renamed to [.env, .gitignore] but the original files are still present, so the user has to delete the _dot versions.

Expected Behaviour

Files are renamed on create/init

Actual Behaviour

Files are duplicated, and renamed, so there are 2 versions
Reproduce Scenario (including but not limited to)
aio app init

Fixes #184

Related Issue

Motivation and Context

It leaves unused files on the user's disk. Need to remove it.

How Has This Been Tested?

  • Code has been tested on local machine
  • Unit test case has been added for the same

Screenshots (if appropriate):

Screenshot 2022-06-08 at 5 29 11 PM

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • I have signed the Adobe Open Source CLA.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@codecov
Copy link

codecov bot commented Jun 8, 2022

Codecov Report

Merging #195 (ea4914c) into master (423c3c4) will not change coverage.
The diff coverage is 100.00%.

@@            Coverage Diff            @@
##            master      #195   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           17        17           
  Lines          392       393    +1     
  Branches        44        44           
=========================================
+ Hits           392       393    +1     
Impacted Files Coverage Δ
generators/base-app/index.js 100.00% <100.00%> (ø)

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 423c3c4...ea4914c. Read the comment docs.

@shazron shazron changed the title fix: dotFiles copied not renamed fix: ACNA-1683 - dotFiles copied not renamed Jun 8, 2022
@shazron shazron merged commit a310827 into master Jun 8, 2022
@shazron shazron deleted the bugfix/ACNA-1683 branch June 8, 2022 12:27
@purplecabbage
Copy link
Member

This looks good, but I think it is really just a problem with the regex here not excluding our _ prefixed files.
// copy everything that does not start with an _
https://github.com/adobe/generator-aio-app/blob/master/generators/base-app/index.js#L50

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.

dotFiles copied not renamed
4 participants