Skip to content

Commit ab8fc0d

Browse files
replicate nuspec fix (#13790)
1 parent 52f687e commit ab8fc0d

File tree

6 files changed

+11
-7
lines changed

6 files changed

+11
-7
lines changed

Tasks/DotNetCoreCLIV2/Tests/L0.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ describe('DotNetCoreExe Suite', function () {
354354

355355
tr.run();
356356
assert(tr.invokedToolCount == 1, 'should have run dotnet once');
357-
assert(tr.ran('c:\\path\\dotnet.exe pack c:\\agent\\home\\directory\\foo.nuspec --output C:\\out\\dir /p:PackageVersion=x.y.z-CI-YYYYMMDD-HHMMSS'), 'it should have run dotnet');
357+
assert(tr.ran('c:\\path\\dotnet.exe pack -p:NuspecFile=c:\\agent\\home\\directory\\foo.nuspec --output C:\\out\\dir /p:PackageVersion=x.y.z-CI-YYYYMMDD-HHMMSS'), 'it should have run dotnet');
358358
assert(tr.stdOutContained('dotnet output'), "should have dotnet output");
359359
assert(tr.succeeded, 'should have succeeded');
360360
assert.equal(tr.errorIssues.length, 0, "should have no errors");
@@ -369,7 +369,7 @@ describe('DotNetCoreExe Suite', function () {
369369

370370
tr.run();
371371
assert(tr.invokedToolCount == 1, 'should have run dotnet once');
372-
assert(tr.ran('c:\\path\\dotnet.exe pack c:\\agent\\home\\directory\\foo.nuspec --output C:\\out\\dir /p:PackageVersion=XX.YY.ZZ'), 'it should have run dotnet');
372+
assert(tr.ran('c:\\path\\dotnet.exe pack -p:NuspecFile=c:\\agent\\home\\directory\\foo.nuspec --output C:\\out\\dir /p:PackageVersion=XX.YY.ZZ'), 'it should have run dotnet');
373373
assert(tr.stdOutContained('dotnet output'), "should have dotnet output");
374374
assert(tr.succeeded, 'should have succeeded');
375375
assert.equal(tr.errorIssues.length, 0, "should have no errors");

Tasks/DotNetCoreCLIV2/Tests/PackTests/packEnvVar.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ let a: ma.TaskLibAnswers = <ma.TaskLibAnswers>{
2424
"dotnet": "c:\\path\\dotnet.exe"
2525
},
2626
"exec": {
27-
"c:\\path\\dotnet.exe pack c:\\agent\\home\\directory\\foo.nuspec --output C:\\out\\dir /p:PackageVersion=XX.YY.ZZ": {
27+
"c:\\path\\dotnet.exe pack -p:NuspecFile=c:\\agent\\home\\directory\\foo.nuspec --output C:\\out\\dir /p:PackageVersion=XX.YY.ZZ": {
2828
"code": 0,
2929
"stdout": "dotnet output",
3030
"stderr": ""

Tasks/DotNetCoreCLIV2/Tests/PackTests/packPrerelease.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ let a: ma.TaskLibAnswers = <ma.TaskLibAnswers>{
2626
"dotnet": "c:\\path\\dotnet.exe"
2727
},
2828
"exec": {
29-
"c:\\path\\dotnet.exe pack c:\\agent\\home\\directory\\foo.nuspec --output C:\\out\\dir /p:PackageVersion=x.y.z-CI-YYYYMMDD-HHMMSS": {
29+
"c:\\path\\dotnet.exe pack -p:NuspecFile=c:\\agent\\home\\directory\\foo.nuspec --output C:\\out\\dir /p:PackageVersion=x.y.z-CI-YYYYMMDD-HHMMSS": {
3030
"code": 0,
3131
"stdout": "dotnet output",
3232
"stderr": ""

Tasks/DotNetCoreCLIV2/packcommand.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,11 @@ function dotnetPackAsync(dotnetPath: string, packageFile: string, outputDir: str
138138
let dotnet = tl.tool(dotnetPath);
139139

140140
dotnet.arg("pack");
141-
dotnet.arg(packageFile);
141+
142+
if(packageFile.endsWith(".nuspec")) {
143+
dotnet.arg("-p:NuspecFile="+packageFile);
144+
}
145+
else dotnet.arg(packageFile);
142146

143147
if (outputDir) {
144148
dotnet.arg("--output");

Tasks/DotNetCoreCLIV2/task.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"demands": [],
1818
"version": {
1919
"Major": 2,
20-
"Minor": 175,
20+
"Minor": 177,
2121
"Patch": 0
2222
},
2323
"minimumAgentVersion": "2.115.0",

Tasks/DotNetCoreCLIV2/task.loc.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"demands": [],
1818
"version": {
1919
"Major": 2,
20-
"Minor": 175,
20+
"Minor": 177,
2121
"Patch": 0
2222
},
2323
"minimumAgentVersion": "2.115.0",

0 commit comments

Comments
 (0)