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

Switch the content from array to string. #1103

Merged
1 commit merged into from
Oct 19, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion eng/common/scripts/copy-docs-to-blobstorage.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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
Copy link
Member

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.

Copy link
Contributor Author

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.

Copy link
Contributor Author

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.

Expand Down