Skip to content

Commit

Permalink
Ensuring every build is deterministic by adding npm ci as a standard (#…
Browse files Browse the repository at this point in the history
…10789)

Ensuring every build is deterministic by adding npm ci as a standard option
  • Loading branch information
Amoenus authored and zjrunner committed Aug 13, 2019
1 parent 0a63e0e commit 5d72a51
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
1 change: 1 addition & 0 deletions Tasks/NpmV1/constants.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
export class NpmCommand {
public static Install: string = 'install';
public static ContinuousIntegration: string = 'ci';
public static Publish: string = 'publish';
public static Custom: string = 'custom';
}
Expand Down
2 changes: 2 additions & 0 deletions Tasks/NpmV1/npm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ async function main(): Promise<void> {
switch (command) {
case NpmCommand.Install:
return npmCustom.run(packagingLocation, NpmCommand.Install);
case NpmCommand.ContinuousIntegration:
return npmCustom.run(packagingLocation, NpmCommand.ContinuousIntegration);
case NpmCommand.Publish:
return npmPublish.run(packagingLocation);
case NpmCommand.Custom:
Expand Down
11 changes: 6 additions & 5 deletions Tasks/NpmV1/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@
"instanceNameFormat": "npm $(command)",
"groups": [
{
"displayName": "Custom registries and authentication",
"name": "customRegistries",
"isExpanded": false,
"visibleRule": "command = install || command = custom"
"displayName": "Custom registries and authentication",
"name": "customRegistries",
"isExpanded": false,
"visibleRule": "command = install || command = ci || command = custom"
},
{
"name": "publishRegistries",
Expand All @@ -38,7 +38,7 @@
"displayName": "Advanced",
"name": "advanced",
"isExpanded": false,
"visibleRule": "command = install || command = publish"
"visibleRule": "command = install || command = ci || command = publish"
}
],
"inputs": [
Expand All @@ -49,6 +49,7 @@
"type": "pickList",
"required": true,
"options": {
"ci": "ci",
"install": "install",
"publish": "publish",
"custom": "custom"
Expand Down

0 comments on commit 5d72a51

Please sign in to comment.