-
Notifications
You must be signed in to change notification settings - Fork 445
fix: PowerShell script set CRLF on Windows, instead of LF #4972
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
Conversation
@ReneHezser - As this will trigger all workflows please associate some test runs to this PR - We have a handy script for running this in your branch https://github.com/Azure/bicep-registry-modules/blob/main/utilities/tools/Invoke-WorkflowsForBranch.ps1 |
The workflows don't need to run after merging this. The problem only occurs on non-linux machines for contributors. The workflows - and the current files - are not affected. The PR is to avoid issues in the future. |
We can (should) disable triggers before merge. Nevertheless I agree we should test that any change does not impact the current environment by running all workflows on static validation and a few selected workflows on all stages |
utilities/pipelines/sharedScripts/tokenReplacement/helper/Convert-TokenInFile.ps1
Show resolved
Hide resolved
@eriqua @ChrisSidebotham I ran the static tests on all modules and deployment tests on two. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🆗
Description
For token replacement, the bicep files are touched. On Windows, the PowerShell script takes the line ending of the OS.
This fix ignores the OS and always uses LF instead of CRLF.
Pipeline Reference
I tested on Windows and WSL Ubuntu.
Deployment Tests (both green)
https://github.com/ReneHezser/bicep-registry-modules/actions/runs/14248642871
https://github.com/ReneHezser/bicep-registry-modules/actions/runs/14248651739
Static Tests
















- Failed: Module tests / Template tests / Parameters / [azd/ml-ai-environment] All required parameters & UDTs in template file should have description that start with "(Required|Conditional).".
- Failed: WAF test




- Failed: 1. Module tests / Template tests / Parameters / [dev-ops/cicd-agents-and-runners] All non-required parameters & UDTs in template file should not have description that start with "Required.". 2. Module tests / Template tests / Parameters / [dev-ops/cicd-agents-and-runners] All required parameters & UDTs in template file should have description that start with "(Required|Conditional).".
- Failed: Module tests / Template tests / Parameters / [finops-toolkit/finops-hub] All required parameters & UDTs in template file should have description that start with "(Required|Conditional).".
- Failed: Module tests / Template tests / Parameters / [lz/sub-vending] Parameter & UDT names should be camel-cased (no dashes or underscores and must start with lower-case letter).





- Failed: WAF test

























































































- Failed: WAF tests
















- Failed: Module tests / Readme content tests / [network/local-network-gateway] Set-ModuleReadMe script should not apply any updates.












































- Failed: 1. Module tests / Template tests / Parameters / [virtual-machine-images/image-template] All non-required parameters & UDTs in template file should not have description that start with "Required.". 2. Module tests / Template tests / Parameters / [virtual-machine-images/image-template] Conditional parameters' & UDT's description should contain 'Required if' followed by the condition making the parameter required.






Type of Change
version.json
:version.json
.version.json
.Checklist
Set-AVMModule
locally to generate the supporting module files.