Skip to content

Commit

Permalink
Merge pull request #162 from pippolino/hotfix/6.2.2
Browse files Browse the repository at this point in the history
Hotfix/6.2.2
  • Loading branch information
pippolino authored Apr 10, 2024
2 parents 3b4ee58 + 41fb855 commit 927c88b
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 12 deletions.
7 changes: 3 additions & 4 deletions Tasks/DependencyCheck/dependency-check-build-task.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import tl = require('azure-pipelines-task-lib/task');
import httpClient = require('typed-rest-client/HttpClient');
import fs = require('fs');
import url = require('url');
import path = require('path');
import decompress from 'decompress';
import { IHttpClientResponse } from 'typed-rest-client/Interfaces';
Expand Down Expand Up @@ -125,7 +124,7 @@ async function run() {
// Set installation location
if (localInstallPath == sourcesDirectory) {
hasLocalInstallation = false;
localInstallPath = tl.resolve('./dependency-check');
localInstallPath = path.join(__dirname, 'dependency-check');

tl.checkPath(localInstallPath, 'Dependency Check installer');

Expand All @@ -139,7 +138,7 @@ async function run() {
}

cleanLocalInstallPath(localInstallPath);
await unzipFromUrl(zipUrl, tl.resolve('./'));
await unzipFromUrl(zipUrl, path.join(localInstallPath, '../'));
}

// Pull cached data archive
Expand Down Expand Up @@ -319,7 +318,7 @@ function maskArguments(args: string): string {
}

async function unzipFromUrl(zipUrl: string, unzipLocation: string): Promise<void> {
const fileName = path.basename(url.parse(zipUrl).pathname);
const fileName = path.basename(new URL(zipUrl).pathname);
const zipLocation = tl.resolve(fileName)
let tmpError = null;
let response: IHttpClientResponse = null;
Expand Down
11 changes: 10 additions & 1 deletion azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,17 @@ trigger:
- refs/heads/hotfix/*
- refs/tags/*

parameters:
- name: variable_group_name
displayName: Variable Group
type: string
default: 'DependencyCheck-AzureDevOps'

pool:
vmImage: 'ubuntu-latest'

variables:
- group: DependencyCheck-AzureDevOps
- group: ${{ parameters.variable_group_name }}
- name: CurrentDate
value: $[ format('{0:yyyy}{0:MM}{0:dd}', pipeline.startTime) ]
- name: PublishEnvironment
Expand All @@ -20,6 +26,9 @@ variables:
value: 'Development'
${{ if startsWith( variables['Build.SourceBranch'], 'refs/heads/hotfix/' ) }}:
value: 'Hotfix'
${{ else }}:
value: 'Development'


stages:
- stage: 'buildStage'
Expand Down
10 changes: 5 additions & 5 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 @@ -49,7 +49,7 @@
"semver": "^7.5.4",
"shelljs": "^0.8.5",
"terser-webpack-plugin": "^5.3.10",
"tfx-cli": "^0.16.0",
"tfx-cli": "^0.17.0",
"ts-loader": "^9.5.1",
"ts-node": "^10.9.2",
"typescript": "^5.4.4",
Expand All @@ -58,7 +58,7 @@
"webpack-cli": "^5.1.4",
"webpack-node-externals": "^3.0.0",
"yargs": "^17.7.2",
"mocha": "^10.2.0",
"mocha": "^10.4.0",
"assert": "^2.1.0"
}
}

0 comments on commit 927c88b

Please sign in to comment.