Skip to content

add temp task to build a v2 version of the extension & updates version of vscode-languageclient (WIP) #1350

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

Merged
merged 3 commits into from
Jun 9, 2018
Merged
Show file tree
Hide file tree
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
64 changes: 25 additions & 39 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"publisher": "ms-vscode",
"description": "Develop PowerShell scripts in Visual Studio Code!",
"engines": {
"vscode": "^1.19.0"
"vscode": "^1.22.0"
},
"license": "SEE LICENSE IN LICENSE.txt",
"homepage": "https://github.com/PowerShell/vscode-powershell/blob/master/README.md",
Expand Down Expand Up @@ -38,7 +38,7 @@
],
"dependencies": {
"vscode": "^1.1.18",
"vscode-languageclient": "^4.1.4"
"vscode-languageclient": "^4.2.1"
},
"devDependencies": {
"@types/mocha": "^2.2.32",
Expand Down
8 changes: 4 additions & 4 deletions src/features/NewFileOrProject.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,19 +97,19 @@ export class NewFileOrProjectFeature implements IFeature {

if (!includeInstalledModules) {
templates =
[{
Copy link
Contributor

Choose a reason for hiding this comment

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

This is brutal. Does TypeScript force this?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah Typescript wasn't happy without those :/

[({
label: this.loadIcon,
description: "Load additional templates from installed modules",
template: undefined,
}]
} as ITemplateQuickPickItem)]
.concat(templates);
} else {
templates =
[{
[({
label: this.loadIcon,
description: "Refresh template list",
template: undefined,
}]
} as ITemplateQuickPickItem)]
.concat(templates);
}

Expand Down
36 changes: 35 additions & 1 deletion vscode-powershell.build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -119,10 +119,44 @@ task Package {
Move-Item -Force .\PowerShell-$($script:ExtensionVersion).vsix .\PowerShell-insiders.vsix
}

task V2Process {
# Throwing this in so that we can get v2 builds going. This should be refactored later.
try {
if (!$script:psesBuildScriptPath) {
throw "PSES path required."
}

# grab 2.0 PSRL bits
Write-Host "`n### Grabbing 2.0 bits"
Push-Location ..\PowerShellEditorServices
git remote add patrick https://github.com/SeeminglyScience/PowerShellEditorServices.git
Copy link
Contributor

Choose a reason for hiding this comment

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

This is temporary until we merge the PSReadLine PR into the v2 branch, yeah?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah. Then we'll just checkout the v2 branch

git fetch --all
git checkout integrate-psreadline-2
Invoke-Build Build
Pop-Location

Write-Host "`n### Copying PowerShellEditorServices module files" -ForegroundColor Green
Copy-Item -Recurse -Force ..\PowerShellEditorServices\module\* .\modules

Write-Host "`n### Packaging PowerShell-insiders.vsix`n" -ForegroundColor Green
exec { & node ./node_modules/vsce/out/vsce package }

# Change the package to have a static name for automation purposes
Move-Item -Force .\PowerShell-$($script:ExtensionVersion).vsix .\PowerShell-v2-insiders.vsix
}
catch {
Write-Host "tried to build v2 but failed because of: `n`n$_"
}

}

task UploadArtifacts -If { $env:AppVeyor } {

Push-AppveyorArtifact .\PowerShell-insiders.vsix
if (Test-Path .\PowerShell-v2-insiders.vsix) {
Push-AppveyorArtifact .\PowerShell-v2-insiders.vsix
}
}

# The default task is to run the entire CI build
task . GetExtensionVersion, CleanAll, BuildAll, Test, Package, UploadArtifacts
task . GetExtensionVersion, CleanAll, BuildAll, Test, Package, V2Process, UploadArtifacts