From aef072f2fcac6adbaba12d00154680b72573f74c Mon Sep 17 00:00:00 2001 From: Benito Palacios Sanchez Date: Sat, 5 Mar 2022 21:53:33 +0100 Subject: [PATCH] :arrow_up: Migrate to .NET 6 --- .config/dotnet-tools.json | 2 +- .devcontainer/Dockerfile | 16 ++++----------- .devcontainer/devcontainer.json | 8 ++------ .github/workflows/build-and-release.yml | 14 +------------ README.md | 7 +++---- build.cake | 2 +- docs/docfx.json | 2 +- src/Directory.Build.props | 2 ++ src/Directory.Packages.props | 20 +++++++++---------- src/Ekona.Tests/Ekona.Tests.csproj | 6 +++--- src/Ekona.Tests/Resources/.gitignore | 4 +++- .../Resources/Containers/banner.txt | 3 +++ .../Resources/Containers/header.txt | 3 +++ src/Ekona.Tests/Resources/Containers/rom.txt | 3 +++ src/Ekona/Ekona.csproj | 6 +++++- 15 files changed, 45 insertions(+), 53 deletions(-) create mode 100644 src/Ekona.Tests/Resources/Containers/banner.txt create mode 100644 src/Ekona.Tests/Resources/Containers/header.txt create mode 100644 src/Ekona.Tests/Resources/Containers/rom.txt diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json index 6cf141e..b6cadaf 100644 --- a/.config/dotnet-tools.json +++ b/.config/dotnet-tools.json @@ -3,7 +3,7 @@ "isRoot": true, "tools": { "cake.tool": { - "version": "1.1.0", + "version": "2.1.0", "commands": [ "dotnet-cake" ] diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 424b9ce..8453355 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -1,17 +1,9 @@ -FROM mcr.microsoft.com/vscode/devcontainers/dotnet:5.0 +FROM mcr.microsoft.com/vscode/devcontainers/dotnet:6.0 -# Install .NET Core 3.1 -RUN wget https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb \ - && dpkg -i packages-microsoft-prod.deb \ - && apt-get update \ - && apt-get install -y apt-transport-https \ - && apt-get update \ - && apt-get install -y aspnetcore-runtime-3.1 - -# Install Mono (soon won't be necessary (.NET 6?)) -RUN apt install gnupg ca-certificates \ +# Install Mono (for DocFX) +RUN apt install -y apt-transport-https dirmngr gnupg ca-certificates \ && apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF \ - && echo "deb https://download.mono-project.com/repo/ubuntu stable-focal main" >> /etc/apt/sources.list.d/mono-official-stable.list \ + && echo "deb https://download.mono-project.com/repo/debian stable-buster main" >> /etc/apt/sources.list.d/mono-official-stable.list \ && apt update \ && export DEBIAN_FRONTEND=noninteractive \ && apt install -y mono-devel diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 7a5d2c1..77f5949 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,11 +1,7 @@ { - "name": "Dev (Ubuntu - .NET 5, 3.1 and Mono)", + "name": "Dev (.NET 6 and Mono)", "build": { - "dockerfile": "Dockerfile" - }, - - "settings": { - "terminal.integrated.shell.linux": "/bin/bash" + "dockerfile": "Dockerfile", }, "extensions": [ diff --git a/.github/workflows/build-and-release.yml b/.github/workflows/build-and-release.yml index 76f418c..1e59e74 100644 --- a/.github/workflows/build-and-release.yml +++ b/.github/workflows/build-and-release.yml @@ -14,7 +14,7 @@ on: - published env: - NET_SDK: '5.0.203' + NET_SDK: '6.0.200' jobs: build_main: @@ -31,10 +31,6 @@ jobs: uses: actions/setup-dotnet@v1 with: dotnet-version: ${{ env.NET_SDK }} - - name: "Setup .NET Core 3.1 for Cake dependencies" - uses: actions/setup-dotnet@v1 - with: - dotnet-version: '3.1.409' - name: "Install build tools" run: dotnet tool restore @@ -81,10 +77,6 @@ jobs: uses: actions/setup-dotnet@v1 with: dotnet-version: ${{ env.NET_SDK }} - - name: "Setup .NET Core 3.1 for Cake dependencies" - uses: actions/setup-dotnet@v1 - with: - dotnet-version: '3.1.409' - name: "Install build tools" run: dotnet tool restore @@ -119,10 +111,6 @@ jobs: uses: actions/setup-dotnet@v1 with: dotnet-version: ${{ env.NET_SDK }} - - name: "Setup .NET Core 3.1 for Cake dependencies" - uses: actions/setup-dotnet@v1 - with: - dotnet-version: '3.1.409' - name: "Install build tools" run: dotnet tool restore diff --git a/README.md b/README.md index d41258e..85f0410 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ [Yarhl](https://github.com/SceneGate/yarhl) plugin for Nintendo DS common formats. -The library supports .NET 5.0 and above on Linux, Window and MacOS. +The library supports .NET 6.0 and above on Linux, Window and MacOS. | Release | Package | @@ -26,9 +26,8 @@ Check our on-line [API documentation](https://scenegate.github.io/Ekona/). ## Build -The project requires to build .NET 5.0 SDK, .NET Core 3.1 runtime and .NET -Framework 4.8 or latest Mono. If you open the project with VS Code and you did -install the +The project requires to build .NET 6.0 SDK and .NET Framework 4.8 or latest +Mono. If you open the project with VS Code and you did install the [VS Code Remote Containers](https://code.visualstudio.com/docs/remote/containers) extension, you can have an already pre-configured development environment with Docker or Podman. diff --git a/build.cake b/build.cake index 7c983cd..ec7c2eb 100644 --- a/build.cake +++ b/build.cake @@ -1,4 +1,4 @@ -#load "nuget:?package=PleOps.Cake&version=0.4.2" +#load "nuget:?package=PleOps.Cake&version=0.7.0" Task("Define-Project") .Description("Fill specific project information") diff --git a/docs/docfx.json b/docs/docfx.json index 72e25aa..d9c7260 100644 --- a/docs/docfx.json +++ b/docs/docfx.json @@ -4,7 +4,7 @@ "src": [ { "files": [ - "Ekona/Ekona.csproj" + "Ekona/bin/**/SceneGate.Ekona.dll" ], "src": "../src" } diff --git a/src/Directory.Build.props b/src/Directory.Build.props index 4999150..bad6068 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -6,6 +6,7 @@ Copyright (C) 2021 SceneGate true + NETSDK1179 @@ -13,6 +14,7 @@ https://github.com/SceneGate/Ekona https://github.com/SceneGate/Ekona + README.md reverse-engineering;scenegate;nds diff --git a/src/Directory.Packages.props b/src/Directory.Packages.props index c05032d..3dee33e 100644 --- a/src/Directory.Packages.props +++ b/src/Directory.Packages.props @@ -1,21 +1,21 @@ - - + + - - + + - - - + + + - + - - + + diff --git a/src/Ekona.Tests/Ekona.Tests.csproj b/src/Ekona.Tests/Ekona.Tests.csproj index ac0e155..fc09561 100644 --- a/src/Ekona.Tests/Ekona.Tests.csproj +++ b/src/Ekona.Tests/Ekona.Tests.csproj @@ -4,7 +4,7 @@ SceneGate.Ekona.Tests SceneGate.Ekona.Tests Tests for Ekona. - net5.0 + net6.0 @@ -18,8 +18,8 @@ - - + + diff --git a/src/Ekona.Tests/Resources/.gitignore b/src/Ekona.Tests/Resources/.gitignore index d312116..d5c5f92 100644 --- a/src/Ekona.Tests/Resources/.gitignore +++ b/src/Ekona.Tests/Resources/.gitignore @@ -1 +1,3 @@ -*/ +*.nds +*.banner +*.png diff --git a/src/Ekona.Tests/Resources/Containers/banner.txt b/src/Ekona.Tests/Resources/Containers/banner.txt new file mode 100644 index 0000000..e4e6673 --- /dev/null +++ b/src/Ekona.Tests/Resources/Containers/banner.txt @@ -0,0 +1,3 @@ +PSL_VPYJ2P_00.banner +METALMAX3_BM9JQC_00.banner +NINOKUNI_B2KJHF_00.banner diff --git a/src/Ekona.Tests/Resources/Containers/header.txt b/src/Ekona.Tests/Resources/Containers/header.txt new file mode 100644 index 0000000..4d69c4d --- /dev/null +++ b/src/Ekona.Tests/Resources/Containers/header.txt @@ -0,0 +1,3 @@ +PSL_VPYJ2P_00.header.yml,PSL_VPYJ2P_00.nds +NINOKUNI_B2KJHF_00.header.yml,NINOKUNI_B2KJHF_00.nds +METALMAX3_BM9JQC_00.header.yml,METALMAX3_BM9JQC_00.nds diff --git a/src/Ekona.Tests/Resources/Containers/rom.txt b/src/Ekona.Tests/Resources/Containers/rom.txt new file mode 100644 index 0000000..f4be2a5 --- /dev/null +++ b/src/Ekona.Tests/Resources/Containers/rom.txt @@ -0,0 +1,3 @@ +#PSL_VPYJ2P_00.yml,PSL_VPYJ2P_00.nds +METALMAX3_BM9JQC_00.yml,METALMAX3_BM9JQC_00.nds +#NINOKUNI_B2KJHF_00.yml,NINOKUNI_B2KJHF_00.nds diff --git a/src/Ekona/Ekona.csproj b/src/Ekona/Ekona.csproj index 93a6622..aa11965 100644 --- a/src/Ekona/Ekona.csproj +++ b/src/Ekona/Ekona.csproj @@ -4,9 +4,13 @@ SceneGate.Ekona SceneGate.Ekona Library for NDS file formats. - net5.0 + net6.0 + + + +