-
Notifications
You must be signed in to change notification settings - Fork 517
Have build script add dependent modules (PSSA & Plaster) #1239
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
TylerLeonhardt
merged 9 commits into
PowerShell:master
from
TylerLeonhardt:appveyor-full-vsix
Mar 23, 2018
Merged
Changes from 6 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
717a5e7
Save PowerShell module deps to module folder on restore
TylerLeonhardt 29c02ce
clean up tasks
TylerLeonhardt c482592
fix execution logic
TylerLeonhardt 9a27223
forgot the PSES.VSCode module
TylerLeonhardt f9cc1ec
add modules.json and grab versions from that
TylerLeonhardt ce694b3
fix travis and appveyor to install and use latest PowerShellGet
TylerLeonhardt 1504bb0
add sudo
TylerLeonhardt 0bf2da2
feedback and PSScriptRoot
TylerLeonhardt 8af0411
Merge branch 'appveyor-full-vsix' of github.com:tylerl0706/vscode-pow…
TylerLeonhardt File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"PSScriptAnalyzer":{ | ||
"MinimumVersion":"1.0", | ||
"MaximumVersion":"1.99", | ||
"AllowPrerelease":false | ||
}, | ||
"Plaster":{ | ||
"MinimumVersion":"1.0", | ||
"MaximumVersion":"1.99", | ||
"AllowPrerelease":false | ||
} | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -53,7 +53,9 @@ task ResolveEditorServicesPath -Before CleanEditorServices, BuildEditorServices | |
} | ||
} | ||
|
||
task Restore -If { "Restore" -in $BuildTask -or !(Test-Path "./node_modules") } -Before Build { | ||
task Restore RestoreNodeModules, RestorePowerShellModules -Before Build | ||
|
||
task RestoreNodeModules -If { -not (Test-Path "$PSScriptRoot/node_modules") } { | ||
|
||
Write-Host "`n### Restoring vscode-powershell dependencies`n" -ForegroundColor Green | ||
|
||
|
@@ -63,6 +65,20 @@ task Restore -If { "Restore" -in $BuildTask -or !(Test-Path "./node_modules") } | |
exec { & npm install $logLevelParam } | ||
} | ||
|
||
task RestorePowerShellModules -If { -not (Test-Path "$PSScriptRoot/modules/Plaster") } { | ||
$modules = Get-Content -Raw "./modules.json" | ConvertFrom-Json | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Quotes aren't needed here, but nbd. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. added $PSScriptRoot |
||
$modules.PSObject.Properties | ForEach-Object { | ||
$params = @{ | ||
Name = $_.Name | ||
MinimumVersion = $_.Value.MinimumVersion | ||
MaximumVersion = $_.Value.MaximumVersion | ||
AllowPrerelease = $_.Value.AllowPrerelease | ||
Path = "$PSScriptRoot/modules/" | ||
} | ||
Save-Module @params | ||
} | ||
} | ||
|
||
task Clean { | ||
Write-Host "`n### Cleaning vscode-powershell`n" -ForegroundColor Green | ||
Remove-Item .\out -Recurse -Force -ErrorAction Ignore | ||
|
@@ -107,6 +123,7 @@ task Package { | |
if ($script:psesBuildScriptPath) { | ||
Write-Host "`n### Copying PowerShellEditorServices module files" -ForegroundColor Green | ||
Copy-Item -Recurse -Force ..\PowerShellEditorServices\module\PowerShellEditorServices .\modules | ||
Copy-Item -Recurse -Force ..\PowerShellEditorServices\module\PowerShellEditorServices.VSCode .\modules | ||
} | ||
|
||
Write-Host "`n### Packaging PowerShell-insiders.vsix`n" -ForegroundColor Green | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
have to do this because of updating PowerShellGet
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.
Should we be more explicit here? (e.g.
-Command
instead of-c
)