Skip to content

Commit

Permalink
chore: upgrade to dotnet 8
Browse files Browse the repository at this point in the history
Signed-off-by: JobaDiniz <jobertodinizjunior@gmail.com>
  • Loading branch information
JobaDiniz committed Sep 26, 2024
1 parent c5e9b33 commit 2527b1f
Show file tree
Hide file tree
Showing 9 changed files with 21 additions and 24 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.0.x
dotnet-version: 8.0.x
- name: Restore dependencies
run: dotnet restore ./src
- name: Build
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.0.x
dotnet-version: 8.0.x
- name: Build
run: dotnet publish ./src/Joba.IBM.RPA.Cli/Joba.IBM.RPA.Cli.csproj -c Release -f net7.0 -r win-x64 -p:PublishSingleFile=true -o ./publish --self-contained
run: dotnet publish ./src/Joba.IBM.RPA.Cli/Joba.IBM.RPA.Cli.csproj -c Release -f net8.0 -r win-x64 -p:PublishSingleFile=true -o ./publish --self-contained
- name: e2e tests
run: dotnet test ./src/Tests/Joba.IBM.RPA.Cli.Tests --filter "Category=e2e" --verbosity normal
env:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
# list of changed files within `super-linter`
fetch-depth: 0
- name: Mega Linter
uses: oxsecurity/megalinter/flavors/dotnet@v7.10.0
uses: oxsecurity/megalinter/flavors/dotnet@v8.0.0
env:
VALIDATE_ALL_CODEBASE: false
FILTER_REGEX_EXCLUDE: LICENSE.md
Expand Down
4 changes: 2 additions & 2 deletions src/Joba.IBM.RPA.Cli/Joba.IBM.RPA.Cli.csproj
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<Company>Joba</Company>
Expand Down
9 changes: 3 additions & 6 deletions src/Joba.IBM.RPA/Compiler/WalAnalyzer.cs
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
using System.Text.RegularExpressions;
using System.Xml.Linq;

namespace Joba.IBM.RPA
{
internal sealed partial class WalAnalyzer
{
private readonly WalParser parser = new WalParser();
private readonly WalParser parser = new();

internal WalAnalyzer(WalFile wal)
{
Lines = parser.Parse(wal.Content);
}
internal WalAnalyzer(WalFile wal) : this(wal.Content) { }
internal WalAnalyzer(WalContent content) => Lines = parser.Parse(content);

internal WalLines Lines { get; }

Expand Down
8 changes: 4 additions & 4 deletions src/Joba.IBM.RPA/Joba.IBM.RPA.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
Expand All @@ -15,12 +15,12 @@
<AssemblyAttribute Include="System.Runtime.CompilerServices.InternalsVisibleToAttribute">
<_Parameter1>$(AssemblyName).Tests</_Parameter1>
</AssemblyAttribute>
<AssemblyAttribute Include="System.Runtime.CompilerServices.InternalsVisibleToAttribute">
<_Parameter1>$(AssemblyName).Cli.Tests</_Parameter1>
</AssemblyAttribute>
<AssemblyAttribute Include="System.Runtime.CompilerServices.InternalsVisibleToAttribute">
<_Parameter1>DynamicProxyGenAssembly2</_Parameter1>
</AssemblyAttribute>
<AssemblyAttribute Include="System.Runtime.CompilerServices.InternalsVisibleToAttribute">
<_Parameter1>Joba.IBM.RPA.Cli.Tests</_Parameter1>
</AssemblyAttribute>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Snippets\InjectDependencies.definitions.snippet" />
Expand Down
8 changes: 4 additions & 4 deletions src/Joba.IBM.RPA/Wal/WalFile.cs
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ protected class WalFileProto
}
}

public struct WalContent
public readonly struct WalContent
{
private readonly string content;

Expand All @@ -194,7 +194,7 @@ public WalContent(string content)
}

public static WalContent Build(IEnumerable<string> lines) =>
new WalContent(string.Join(System.Environment.NewLine, lines));
new (string.Join(System.Environment.NewLine, lines));

public override bool Equals([NotNullWhen(true)] object? obj)
{
Expand All @@ -209,7 +209,7 @@ public override bool Equals([NotNullWhen(true)] object? obj)
public static bool operator !=(WalContent left, WalContent right) => !(left == right);
}

public struct WalVersion : IFormattable
public readonly struct WalVersion : IFormattable
{
private readonly int version;

Expand Down Expand Up @@ -238,7 +238,7 @@ public override bool Equals([NotNullWhen(true)] object? obj)
public static bool operator <=(WalVersion left, WalVersion right) => left.version <= right.version;
}

public struct WalFileName
public readonly struct WalFileName
{
private readonly string name;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>

Expand Down
4 changes: 2 additions & 2 deletions src/Tests/Joba.IBM.RPA.Tests/Joba.IBM.RPA.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<IsPackable>false</IsPackable>
Expand Down

0 comments on commit 2527b1f

Please sign in to comment.