Skip to content

Commit 3580c2a

Browse files
Update
1 parent 2b95e8b commit 3580c2a

File tree

3 files changed

+13
-17
lines changed

3 files changed

+13
-17
lines changed

ci/build-common-packages.yml

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -18,25 +18,21 @@ jobs:
1818
- script: npm i -g [email protected] --force
1919
displayName: Use npm version 8.19.4
2020

21-
- script: |
22-
npm install
21+
- script: npm install
2322
displayName: Npm install
2423

25-
- script: |
26-
npm run build
24+
- script: node ./ci/check-versions.js
25+
displayName: Verify tasks' versions
26+
condition: and(succeeded(), ne(variables['Build.SourceBranch'], 'refs/heads/main'))
27+
28+
- script: npm run build
2729
displayName: Build Common Npm packages
2830

29-
- script: |
30-
node ./ci/verify-source-changes.js
31+
- script: node ./ci/verify-source-changes.js
3132
displayName: Verify task source changes
3233
condition: and(succeeded(), ne(variables['Build.SourceBranch'], 'refs/heads/main'))
3334

34-
- script: node ./ci/check-versions.js
35-
displayName: Verify tasks' versions
36-
condition: and(succeeded(), ne(variables['Build.SourceBranch'], 'refs/heads/main'))
37-
38-
- script: |
39-
npm run test
35+
- script: npm run test
4036
displayName: Test Common Npm packages
4137

4238
- task: PublishTestResults@2
@@ -52,8 +48,7 @@ jobs:
5248
summaryFileLocation: $(System.DefaultWorkingDirectory)/test-results/*coverage.xml
5349

5450
# For CI runs on master, automatically publish packages
55-
- bash: |
56-
npm run publish
51+
- bash: npm run publish
5752
condition: and(succeeded(), in(variables['build.reason'], 'IndividualCI', 'BatchedCI', 'Manual'), eq(variables['Agent.OS'], 'Windows_NT'))
5853
env:
5954
NPM_TOKEN: $(npm-automation.token)

ci/check-versions.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const packages = [
2121
'webdeployment-common',
2222
];
2323

24-
const gitDiffResult = execSync('git diff --name-only main', { encoding: 'utf8' }).split('\n');
24+
const gitDiffResult = execSync('git --no-pager diff --name-only origin/master', { encoding: 'utf8' }).split('\n');
2525
const changedFolders = new Set();
2626

2727
for (const filePath of gitDiffResult) {

common-npm-packages/azurermdeploycommon/webdeployment-common/webconfigutil.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ function replaceMultiple(text: string, substitutions: any): string {
1919
return text;
2020
}
2121

22+
2223
function addMissingParametersValue(appType: string, webConfigParameters) {
2324
var paramDefaultValue = {
2425
'node': {
@@ -95,14 +96,14 @@ export function addWebConfigFile(folderPath: any, webConfigParameters, rootDirec
9596
}
9697
} else if(appType == 'Go') {
9798
if (util.isNullOrUndefined(webConfigParameters['GoExeFileName'])
98-
|| util.isNullOrUndefined(webConfigParameters['GoExeFileName'].value)
99+
|| util.isNullOrUndefined(webConfigParameters['GoExeFileName'].value)
99100
|| webConfigParameters['GoExeFileName'].value.length <=0) {
100101
throw Error(tl.loc('GoExeNameNotPresent'));
101102
}
102103
selectedAppTypeParams['GoExeFilePath'] = rootDirectoryPath + "\\" + webConfigParameters['GoExeFileName'].value;
103104
} else if(appType == 'java_springboot') {
104105
if (util.isNullOrUndefined(webConfigParameters['JAR_PATH'])
105-
|| util.isNullOrUndefined(webConfigParameters['JAR_PATH'].value)
106+
|| util.isNullOrUndefined(webConfigParameters['JAR_PATH'].value)
106107
|| webConfigParameters['JAR_PATH'].value.length <= 0) {
107108
throw Error(tl.loc('JarPathNotPresent'));
108109
}

0 commit comments

Comments
 (0)