-
Notifications
You must be signed in to change notification settings - Fork 183
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
Switch the content from array to string. #1103
Conversation
The following pipelines have been queued for testing: |
Hello @azure-sdk! Because this pull request has the p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (
|
@@ -205,7 +205,7 @@ function Upload-Blobs | |||
if ($ReleaseTag) { | |||
foreach ($htmlFile in (Get-ChildItem $DocDir -include *.html -r)) | |||
{ | |||
$fileContent = Get-Content -Path $htmlFile | |||
$fileContent = Get-Content -Path $htmlFile -Raw | |||
$updatedFileContent = $fileContent -replace $RepoReplaceRegex, "`${1}$ReleaseTag" | |||
if ($updatedFileContent -ne $fileContent) { | |||
Set-Content -Path $htmlFile -Value $updatedFileContent |
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.
@sima-zhu since you are now using -Raw have you verified that the Set-Content works correctly? I think you will need to now pass the "-NoNewLine" option to it as well otherwise it will add a new line at the end of the file.
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.
Did not verify newline, but double check with the all release tag works just fine. Will do more check here and submit a new PR if it is a miss.
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.
I just tested it locally, it actually add new line in the scripts. Thanks for spotting the issue. Will submit another PR.
This is a follow up PR (#1103) which introduced extra new line at the end of the file. Local testing indicates we added new line at end. Checked the github io, and it does not bring too many differences. E.g. After PR, https://azuresdkdocs.blob.core.windows.net/$web/javascript/azure-template/1.0.9-beta.22/index.html Before PR, https://azuresdkdocs.blob.core.windows.net/$web/javascript/azure-template/1.0.9-beta.20/index.html
Fixed the issue: Azure/azure-sdk-for-js#11827 JS pipeline running super slow on array object of `Get-Content`. Tested using -Raw, replacement works correctly and the entire process speeds up.
This is a follow up PR (#1103) which introduced extra new line at the end of the file. Local testing indicates we added new line at end. Checked the github io, and it does not bring too many differences. E.g. After PR, https://azuresdkdocs.blob.core.windows.net/$web/javascript/azure-template/1.0.9-beta.22/index.html Before PR, https://azuresdkdocs.blob.core.windows.net/$web/javascript/azure-template/1.0.9-beta.20/index.html
Fixed the issue: Azure/azure-sdk-for-js#11827
JS pipeline running super slow on array object of
Get-Content
.Tested using -Raw, replacement works correctly and the entire process speeds up.