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

Enh deploy release v6 #278

Merged
merged 12 commits into from
Jan 16, 2023
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -123,4 +123,7 @@ dist/
*.received.*
*.DS_Store

*.iml
*.iml

modules/*
reports/*
6 changes: 6 additions & 0 deletions localbuild.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash
rm -r dist
npm run build
rm -r modules
mkdir dist
pwsh -NoProfile -ExecutionPolicy Unrestricted ./pack.ps1 LocalTest $1 -setupTaskDependencies
14 changes: 7 additions & 7 deletions pack.ps1
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
param (
[Parameter(Mandatory=$true,HelpMessage="LocalTest, Test or Production")]
[Parameter(Mandatory = $true, HelpMessage = "LocalTest, Test or Production")]
[ValidateSet("LocalTest", "Test", "Production")]
[string]
$environment,
[Parameter(Mandatory=$true,HelpMessage="The three number version for this release")]
[Parameter(Mandatory = $true, HelpMessage = "The three number version for this release")]
[string]
$version,
[switch]
Expand Down Expand Up @@ -81,8 +81,7 @@ function Get-TaskId($envName, $taskName) {
$taskIds = ConvertFrom-Json -InputObject (Get-Content "$basePath/task-ids.json" -Raw)
$result = $taskIds.$envName.$taskName

if([String]::IsNullOrEmpty($result))
{
if ([String]::IsNullOrEmpty($result)) {
throw "Could not find task $taskName ID for environment $envName. Failing as this is required and will prevent the extension from installing otherwise."
}
return $result
Expand Down Expand Up @@ -127,11 +126,12 @@ function Pack($envName, $environment, $workingDirectory) {

& ./node_modules/.bin/tfx extension create --root $workingDirectory --manifest-globs extension-manifest.json --overridesFile $overridesFile --outputPath "$buildArtifactsPath/$environment" --no-prompt

if (-not $?) {throw "Failed to create extension. Exit Code $LASTEXITCODE"}
& npm uninstall tfx-cli
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is the only change to this line, the rest was auto-formatting kicking in

if (-not $?) { throw "Failed to create extension. Exit Code $LASTEXITCODE" }

}

if ($setupTaskDependencies -eq $true)
{
if ($setupTaskDependencies -eq $true) {
SetupTaskDependencies $buildDirectoryPath
}
Pack "VSTSExtensions" $environment $buildDirectoryPath
129 changes: 117 additions & 12 deletions package-lock.json

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

3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"devDependencies": {
"@tsconfig/node10": "^1.0.9",
"@types/archiver": "^5.3.1",
"@types/command-line-args": "^5.2.0",
"@types/express": "^4.17.13",
"@types/glob": "7.2.0",
"@types/jest": "28.1.5",
Expand Down Expand Up @@ -41,10 +42,12 @@
"azure-devops-node-api": "11.2.0",
"azure-pipelines-task-lib": "3.3.1",
"azure-pipelines-tool-lib": "1.3.2",
"command-line-args": "^5.2.1",
"fp-ts": "1.19.5",
"glob": "7.2.0",
"ramda": "0.28.0",
"semver": "^7.3.7",
"shlex": "^2.1.2",
"typed-rest-client": "1.8.9",
"uuid": "8.3.2",
"vss-web-extension-sdk": "5.141.0"
Expand Down
Loading