The *.sh files will become windows CRLF EOF in the cloudbuild drop output.
I have set the .gitattributes with:
text= and * -text and *.sh eol=lf on master branch.
And I have added all the files in my scripts folder with:
git add --renormalize .\scripts in my branch.
But the cloudbuild drop would still force the *.sh file into CRLF in the drop explorer.
git config --global --get core.autocrlf is input.
How to resolve this issue?
I can reproduce the same issue in Azure DevOps Pipeline.
The cause of the issue is that when we cloning the repo to Windows Agent, it will auto convert the LF to CRLF. Then when publishing the Drop Build Artifacts, it will show the CRLF EOL.
To solve this issue, you can run the command:
git config --global core.autocrlf falsebefore the git checkout step.For example:
Then the files in the Drop Build Artifacts will keep the LF EOL.