Skip to content

Updating tool to net5 #169

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Apr 7, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/ConvertGuidelinesXmlToMarkdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,12 @@ jobs:
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 3.1.301
dotnet-version: 5.0.201
if: ${{ steps.diff.outputs.modified == 'true' }}

- name: restore_compile_run_createMD
run: |
dotnet run --configuration Release --project ./XMLtoMD/GuidelineXmlToMD/GuidelineXmlToMD.csproj
run: >
dotnet run --configuration Release --project ./XMLtoMD/GuidelineXmlToMD/GuidelineXmlToMD.csproj
-- --xml-input-file "./docs/${{ env.XmlFileName }}" --markdown-output-file "./docs/coding/csharp.md"
if: ${{ steps.diff.outputs.modified == 'true' }}

Expand Down
17 changes: 6 additions & 11 deletions .github/workflows/manuallyRunXmlToMD.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,26 +23,21 @@ jobs:
with:
ref: ${{ github.ref }}
token: ${{ secrets.CI_PAT }}




- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 3.1.301

dotnet-version: 5.0.201

- name: restore_compile_run_createMD
run: |
dotnet run --configuration Release --project ./XMLtoMD/GuidelineXmlToMD/GuidelineXmlToMD.csproj
./XMLtoMD/GuidelineXmlToMD/bin/Release/netcoreapp3.1/GuidelineXmlToMD "${{ env.XmlFileName }}"

run: >
dotnet run --configuration Release --project ./XMLtoMD/GuidelineXmlToMD/GuidelineXmlToMD.csproj
-- --xml-input-file "./docs/${{ env.XmlFileName }}" --markdown-output-file "./docs/coding/csharp.md"

- name: Create commit and push to CodingGuideLinesMDUpdate
run: |
git config user.name '${{ github.actor }}'
git config user.email '${{ github.actor }}@user.noreply.github.com'
git add -A
git commit -m "new coding guidelines MD File created"
git push origin '${{ github.ref }}'

git push origin '${{ github.ref }}'
2 changes: 1 addition & 1 deletion XMLtoMD/GuidelineXmlToMD/GuidelineXmlToMD.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFramework>net5.0</TargetFramework>
<LangVersion>9.0</LangVersion>
<PackAsTool>true</PackAsTool>
<ToolCommandName>IntelliTect.EssentialCSharp.Publishing</ToolCommandName>
Expand Down
1 change: 1 addition & 0 deletions XMLtoMD/GuidelineXmlToMD/GuidelineXmlToMD.sln
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
..\..\.github\workflows\ConvertGuidelinesXmlToMarkdown.yml = ..\..\.github\workflows\ConvertGuidelinesXmlToMarkdown.yml
..\..\docs\coding\csharp.md = ..\..\docs\coding\csharp.md
..\..\docs\Guidelines(8th Edition).xml = ..\..\docs\Guidelines(8th Edition).xml
..\..\.github\workflows\manuallyRunXmlToMD.yml = ..\..\.github\workflows\manuallyRunXmlToMD.yml
EndProjectSection
EndProject
Global
Expand Down
11 changes: 11 additions & 0 deletions XMLtoMD/GuidelineXmlToMD/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,22 @@ class Program
/// <param name="console">Injected by System.CommandLine</param>
static void Main(FileInfo xmlInputFile, FileInfo markdownOutputFile, IConsole console)
{
if (xmlInputFile is null)
{
throw new ArgumentNullException(nameof(xmlInputFile));
}

if (markdownOutputFile is null)
{
throw new ArgumentNullException(nameof(markdownOutputFile));
}

if (console is null)
{
throw new ArgumentNullException(nameof(console));
}


if (!xmlInputFile.Exists)
{
throw new FileNotFoundException("Could not find input file", xmlInputFile.FullName);
Expand Down
2 changes: 1 addition & 1 deletion azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ steps:
- task: VSBuild@1
displayName: 'Build'
inputs:
solution: '**/*.sln'
solution: 'IntelliTect.Analyzer.sln'
clean: true
configuration: 'Release'
msbuildArgs: '/p:Version=$(version)'
Expand Down