-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Porting to M153: Searching for csproj, vbproj, fsproj using sdk Micro…
…soft.Net.Sdk.Web (#10776) * Searching for csproj, fsproj that uses Microsoft.Net.Sdk.Web (#10704) * Searching for csproj, vbproj, fsproj using sdk Microsoft.Net.Sdk.Web * Updating package.json * Updating error message * Review comments * Review comments * Try-catch * Iteratively find and check for file encodings * Review comments * Supporting only utf encodings * L0 * Adding semicolons * Removing vbproj * Comments * Updating error message * Updating error message * Updating task version * Updating L0 for DotNetCoreCLIV2 task (#10773) * Updating L0 * Removing unnecessary imports * Review comments
- Loading branch information
1 parent
b39501b
commit 3198d03
Showing
8 changed files
with
154 additions
and
79 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<Project Sdk="Microsoft.NET.Sdk.Web"> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>netcoreapp2.1</TargetFramework> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<Compile Include="Controllers/ValuesController.fs" /> | ||
<Compile Include="Startup.fs" /> | ||
<Compile Include="Program.fs" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Microsoft.AspNetCore.App" /> | ||
</ItemGroup> | ||
|
||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import ma = require('azure-pipelines-task-lib/mock-answer'); | ||
import tmrm = require('azure-pipelines-task-lib/mock-run'); | ||
import path = require('path'); | ||
|
||
let taskPath = path.join(__dirname, '..', 'dotnetcore.js'); | ||
let tmr: tmrm.TaskMockRunner = new tmrm.TaskMockRunner(taskPath); | ||
|
||
tmr.setInput('command', "publish"); | ||
tmr.setInput('projects', process.env["__projects__"]); | ||
tmr.setInput('publishWebProjects', process.env["__publishWebProjects__"] && process.env["__publishWebProjects__"] == "true" ? "true" : "false"); | ||
tmr.setInput('arguments', process.env["__arguments__"] ? process.env["__arguments__"] : ""); | ||
tmr.setInput('modifyOutputPath', process.env["modifyOutput"] == "false" ? "false" : "true"); | ||
tmr.setInput('zipAfterPublish', process.env["zipAfterPublish"] ? process.env["zipAfterPublish"] : "false"); | ||
tmr.setInput('workingDirectory', process.env["workingDirectory"] ? process.env["workingDirectory"] : ""); | ||
|
||
process.env['TASK_TEST_TRACE'] = "true"; | ||
|
||
var projectFile = path.join(__dirname, process.env["__projects__"]); | ||
var execCommand = "dotnet publish " + projectFile | ||
|
||
let a: ma.TaskLibAnswers = <ma.TaskLibAnswers>{ | ||
"which": { | ||
"dotnet": "dotnet", | ||
}, | ||
"checkPath": { "dotnet": true }, | ||
"exec": {}, | ||
"findMatch": { | ||
"**/*.csproj\n**/*.vbproj\n**/*.fsproj": [projectFile] | ||
} | ||
} | ||
|
||
a['exec'][execCommand] = { | ||
"code": 0, | ||
"stdout": "published", | ||
"stderr": "" | ||
} | ||
|
||
process.env["MOCK_NORMALIZE_SLASHES"] = "true"; | ||
tmr.setAnswers(a) | ||
tmr.registerMock('azure-pipelines-task-lib/toolrunner', require('azure-pipelines-task-lib/mock-toolrunner')); | ||
|
||
tmr.run(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters