Update task folder structure nesting (#281)
This commit is contained in:
Родитель
19806641da
Коммит
2e8fdabf7a
|
@ -66,7 +66,7 @@ function CopyExtensionFiles {
|
|||
)
|
||||
process {
|
||||
$sourcePath = Resolve-Path -Path $Path;
|
||||
Get-ChildItem -Path $sourcePath -File -Include *.ps1,*.json,*.png -Recurse | Where-Object {
|
||||
Get-ChildItem -Path $sourcePath -File -Include *.ps1,*.json,*.png,*.ts -Recurse | Where-Object {
|
||||
($_.FullName -notmatch '(\\|\/)(node_modules)')
|
||||
} | ForEach-Object {
|
||||
$filePath = $_.FullName.Replace($sourcePath, $DestinationPath);
|
||||
|
@ -187,7 +187,8 @@ task VstsTaskSdk NuGet, {
|
|||
Save-Module -Name VstsTaskSdk -Path out/ps_modules -RequiredVersion 0.11.0;
|
||||
|
||||
foreach ($task in $tasks) {
|
||||
Copy-Item -Path out/ps_modules/VstsTaskSdk/0.11.0/* -Destination "out/dist/$task/ps_modules/VstsTaskSdk/" -Recurse -Force;
|
||||
$taskRoot = $task.Split('V')[0];
|
||||
Copy-Item -Path out/ps_modules/VstsTaskSdk/0.11.0/* -Destination "out/dist/$taskRoot/$task/ps_modules/VstsTaskSdk/" -Recurse -Force;
|
||||
}
|
||||
|
||||
Remove-Item -Path out/ps_modules/VstsTaskSdk -Force -Recurse;
|
||||
|
@ -208,9 +209,10 @@ task Clean {
|
|||
task CopyExtension {
|
||||
|
||||
foreach ($task in $tasks) {
|
||||
CopyExtensionFiles -Path "tasks/$task" -DestinationPath "out/dist/$task/";
|
||||
Copy-Item -Path package.json -Destination "out/dist/$task/";
|
||||
Copy-Item -Path images/icon128.png -Destination "out/dist/$task/icon.png" -Force;
|
||||
$taskRoot = $task.Split('V')[0];
|
||||
CopyExtensionFiles -Path "tasks/$task" -DestinationPath "out/dist/$taskRoot/$task/";
|
||||
Copy-Item -Path package.json -Destination "out/dist/$taskRoot/$task/";
|
||||
Copy-Item -Path images/icon128.png -Destination "out/dist/$taskRoot/$task/icon.png" -Force;
|
||||
}
|
||||
|
||||
# Copy manifests
|
||||
|
@ -230,12 +232,15 @@ task CopyExtension {
|
|||
|
||||
task BuildExtension CopyExtension, PSRule, PowerShellGet, VstsTaskSdk, {
|
||||
Write-Host '> Building extension' -ForegroundColor Green;
|
||||
exec { & npm run compile }
|
||||
|
||||
foreach ($task in $tasks) {
|
||||
$taskRoot = $task.Split('V')[0];
|
||||
try {
|
||||
Push-Location "out/dist/$task/";
|
||||
Push-Location "out/dist/$taskRoot/$task/"
|
||||
exec { & npm install --only=prod }
|
||||
exec { & npm run compile }
|
||||
|
||||
Remove-Item -Path *.ts -Force;
|
||||
}
|
||||
finally {
|
||||
Pop-Location;
|
||||
|
|
|
@ -2,9 +2,7 @@
|
|||
"compilerOptions": {
|
||||
"target": "ES6",
|
||||
"module": "commonjs",
|
||||
"skipLibCheck": true,
|
||||
"rootDir": "tasks",
|
||||
"outDir": "out/dist",
|
||||
"skipLibCheck": true
|
||||
},
|
||||
"exclude": [
|
||||
"node_modules"
|
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"compilerOptions": {
|
||||
"target": "ES6",
|
||||
"module": "commonjs",
|
||||
"skipLibCheck": true
|
||||
},
|
||||
"exclude": [
|
||||
"node_modules"
|
||||
]
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"compilerOptions": {
|
||||
"target": "ES6",
|
||||
"module": "commonjs",
|
||||
"skipLibCheck": true
|
||||
},
|
||||
"exclude": [
|
||||
"node_modules"
|
||||
]
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"compilerOptions": {
|
||||
"target": "ES6",
|
||||
"module": "commonjs",
|
||||
"skipLibCheck": true
|
||||
},
|
||||
"exclude": [
|
||||
"node_modules"
|
||||
]
|
||||
}
|
|
@ -46,81 +46,55 @@
|
|||
},
|
||||
"files": [
|
||||
{
|
||||
"path": "ps-rule-assert-v0"
|
||||
"path": "ps-rule-assert"
|
||||
},
|
||||
{
|
||||
"path": "ps-rule-assert-v1"
|
||||
},
|
||||
{
|
||||
"path": "ps-rule-install-v0"
|
||||
},
|
||||
{
|
||||
"path": "ps-rule-install-v1"
|
||||
"path": "ps-rule-install"
|
||||
},
|
||||
{
|
||||
"path": "ps_modules/PSRule",
|
||||
"packagePath": "/ps-rule-assert-v0/ps_modules/PSRule"
|
||||
"packagePath": "/ps-rule-assert/ps-rule-assertV0/ps_modules/PSRule"
|
||||
},
|
||||
{
|
||||
"path": "ps_modules/PowerShellGet",
|
||||
"packagePath": "/ps-rule-install-v0/ps_modules/PowerShellGet"
|
||||
"packagePath": "/ps-rule-install/ps-rule-installV0/ps_modules/PowerShellGet"
|
||||
},
|
||||
{
|
||||
"path": "ps_modules/PackageManagement",
|
||||
"packagePath": "/ps-rule-install-v0/ps_modules/PackageManagement"
|
||||
"packagePath": "/ps-rule-install/ps-rule-installV0/ps_modules/PackageManagement"
|
||||
},
|
||||
{
|
||||
"path": "ps_modules/PSRule",
|
||||
"packagePath": "/ps-rule-assert-v1/ps_modules/PSRule"
|
||||
"packagePath": "/ps-rule-assert/ps-rule-assertV1/ps_modules/PSRule"
|
||||
},
|
||||
{
|
||||
"path": "ps_modules/PowerShellGet",
|
||||
"packagePath": "/ps-rule-install-v1/ps_modules/PowerShellGet"
|
||||
"packagePath": "/ps-rule-install/ps-rule-installV1/ps_modules/PowerShellGet"
|
||||
},
|
||||
{
|
||||
"path": "ps_modules/PackageManagement",
|
||||
"packagePath": "/ps-rule-install-v1/ps_modules/PackageManagement"
|
||||
"packagePath": "/ps-rule-install/ps-rule-installV1/ps_modules/PackageManagement"
|
||||
}
|
||||
],
|
||||
"contributions": [
|
||||
{
|
||||
"id": "assert-v0",
|
||||
"id": "assert",
|
||||
"type": "ms.vss-distributed-task.task",
|
||||
"targets": [
|
||||
"ms.vss-distributed-task.tasks"
|
||||
],
|
||||
"properties": {
|
||||
"name": "ps-rule-assert-v0"
|
||||
"name": "ps-rule-assert1"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "assert-v1",
|
||||
"id": "install",
|
||||
"type": "ms.vss-distributed-task.task",
|
||||
"targets": [
|
||||
"ms.vss-distributed-task.tasks"
|
||||
],
|
||||
"properties": {
|
||||
"name": "ps-rule-assert-v1"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "install-v0",
|
||||
"type": "ms.vss-distributed-task.task",
|
||||
"targets": [
|
||||
"ms.vss-distributed-task.tasks"
|
||||
],
|
||||
"properties": {
|
||||
"name": "ps-rule-install-v0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "install-v1",
|
||||
"type": "ms.vss-distributed-task.task",
|
||||
"targets": [
|
||||
"ms.vss-distributed-task.tasks"
|
||||
],
|
||||
"properties": {
|
||||
"name": "ps-rule-install-v1"
|
||||
"name": "ps-rule-install"
|
||||
}
|
||||
}
|
||||
],
|
||||
|
|
Загрузка…
Ссылка в новой задаче