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

Refactor build script and default to preview #1911

Merged

Conversation

TylerLeonhardt
Copy link
Member

@TylerLeonhardt TylerLeonhardt commented Apr 20, 2019

PR Summary

Fixes #1880

  • Makes the build script simpler and more organized
  • Updates the README for preview only during CI and release
  • Updates the version to a date-based version only during CI and release
  • makes "Preview" the default in the repo

PR Checklist

Note: Tick the boxes below that apply to this pull request by putting an x between the square brackets.
Please mark anything not applicable to this PR NA.

  • PR has a meaningful title
  • Summarized changes
  • PR has tests
  • This PR is ready to merge and is not work in progress
    • If the PR is work in progress, please add the prefix WIP: to the beginning of the title and remove the prefix when the PR is ready

@TylerLeonhardt
Copy link
Member Author

Codacy failures are just about Write-Host which we can ignore.

@@ -119,20 +134,30 @@ task UpdateReadme {
$readmeContent = Get-Content -Path $readmePath
if (!($readmeContent -match "This is the PREVIEW version of the PowerShell extension")) {
$readmeContent[0] = $newReadmeTop
$readmeContent > $readmePath
$readmeContent | Set-Content $readmePath -Encoding utf8
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This means we're putting a BOM in right?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm not sure what the default is for this... but I could put utf8NoBOM. Thoughts?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @bergmeister!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The default is UTF8NoBOM in PSCore, but to make it work in Windows PowerShell too I think we have to fall back to .NET

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But we might not need this to work in Windows PowerShell

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated to WriteAllLines .NET API to support Windows PowerShell

Copy link
Contributor

@bergmeister bergmeister Apr 23, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why can we not drop WindowsPowerShell for building purposes only? Developers are not users and I added a pwsh switch to the Azure DevOps task last year and it seems we are not using AppVeyor any more.
I was thinking of changing this line here to use use pwsh instead lately btw.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we probably want to move to pwsh only for building, but I suspect currently we just pick a PowerShell and stick with it. So what @TylerLeonhardt's got is safest for now.

@TylerLeonhardt TylerLeonhardt merged commit 29c01be into PowerShell:master Apr 24, 2019
@TylerLeonhardt TylerLeonhardt deleted the refactor-build-script branch April 24, 2019 16:42
@TylerLeonhardt TylerLeonhardt restored the refactor-build-script branch April 30, 2019 18:56
@TylerLeonhardt TylerLeonhardt deleted the refactor-build-script branch August 10, 2020 15:04
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.

Move to date-based versioning for the extension
3 participants