Began updating to .NET 8.0.
Some checks failed
ydeng/props/pipeline/head There was a failure building this commit
Some checks failed
ydeng/props/pipeline/head There was a failure building this commit
This commit is contained in:
parent
0811fe34a0
commit
ced027da17
26
.vscode/launch.json
vendored
Normal file
26
.vscode/launch.json
vendored
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
{
|
||||||
|
"version": "0.2.0",
|
||||||
|
"configurations": [
|
||||||
|
{
|
||||||
|
// Use IntelliSense to find out which attributes exist for C# debugging
|
||||||
|
// Use hover for the description of the existing attributes
|
||||||
|
// For further information visit https://github.com/dotnet/vscode-csharp/blob/main/debugger-launchjson.md
|
||||||
|
"name": ".NET Core Launch (console)",
|
||||||
|
"type": "coreclr",
|
||||||
|
"request": "launch",
|
||||||
|
"preLaunchTask": "build",
|
||||||
|
// If you have changed target frameworks, make sure to update the program path.
|
||||||
|
"program": "${workspaceFolder}/Props.Shop/Adafruit.Tests/bin/Debug/net8.0/Props.Shop.Adafruit.Tests.dll",
|
||||||
|
"args": [],
|
||||||
|
"cwd": "${workspaceFolder}/Props.Shop/Adafruit.Tests",
|
||||||
|
// For more information about the 'console' field, see https://aka.ms/VSCode-CS-LaunchJson-Console
|
||||||
|
"console": "internalConsole",
|
||||||
|
"stopAtEntry": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": ".NET Core Attach",
|
||||||
|
"type": "coreclr",
|
||||||
|
"request": "attach"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
41
.vscode/tasks.json
vendored
Normal file
41
.vscode/tasks.json
vendored
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
{
|
||||||
|
"version": "2.0.0",
|
||||||
|
"tasks": [
|
||||||
|
{
|
||||||
|
"label": "build",
|
||||||
|
"command": "dotnet",
|
||||||
|
"type": "process",
|
||||||
|
"args": [
|
||||||
|
"build",
|
||||||
|
"${workspaceFolder}/Props.Shop/Props.Shop.sln",
|
||||||
|
"/property:GenerateFullPaths=true",
|
||||||
|
"/consoleloggerparameters:NoSummary;ForceNoAlign"
|
||||||
|
],
|
||||||
|
"problemMatcher": "$msCompile"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "publish",
|
||||||
|
"command": "dotnet",
|
||||||
|
"type": "process",
|
||||||
|
"args": [
|
||||||
|
"publish",
|
||||||
|
"${workspaceFolder}/Props.Shop/Props.Shop.sln",
|
||||||
|
"/property:GenerateFullPaths=true",
|
||||||
|
"/consoleloggerparameters:NoSummary;ForceNoAlign"
|
||||||
|
],
|
||||||
|
"problemMatcher": "$msCompile"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "watch",
|
||||||
|
"command": "dotnet",
|
||||||
|
"type": "process",
|
||||||
|
"args": [
|
||||||
|
"watch",
|
||||||
|
"run",
|
||||||
|
"--project",
|
||||||
|
"${workspaceFolder}/Props.Shop/Props.Shop.sln"
|
||||||
|
],
|
||||||
|
"problemMatcher": "$msCompile"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
22
Jenkinsfile
vendored
22
Jenkinsfile
vendored
@ -8,17 +8,16 @@ pipeline {
|
|||||||
# According to https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-install-script#examples
|
# According to https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-install-script#examples
|
||||||
# and https://learn.microsoft.com/en-us/dotnet/core/install/linux-scripted-manual#scripted-install
|
# and https://learn.microsoft.com/en-us/dotnet/core/install/linux-scripted-manual#scripted-install
|
||||||
curl -L -o- https://dot.net/v1/dotnet-install.sh | bash -s -- --channel 8.0
|
curl -L -o- https://dot.net/v1/dotnet-install.sh | bash -s -- --channel 8.0
|
||||||
echo \'export DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=1\' >> ~/.profile
|
echo export DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=1 >> ~/.bashrc
|
||||||
echo \'export DOTNET_ROOT=$HOME/.dotnet\' >> ~/.profile
|
echo 'export DOTNET_ROOT=$HOME/.dotnet' >> ~/.bashrc
|
||||||
echo \'export PATH=$PATH:$DOTNET_ROOT:$DOTNET_ROOT/tools\' >> ~/.profile
|
echo 'export PATH=$PATH:$DOTNET_ROOT:$DOTNET_ROOT/tools' >> ~/.bashrc
|
||||||
# Installing Node Version Manager
|
# Installing Node Version Manager
|
||||||
# According to https://github.com/nvm-sh/nvm?tab=readme-ov-file#installing-and-updating
|
# According to https://github.com/Schniz/fnm
|
||||||
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
|
curl -fsSL https://fnm.vercel.app/install | bash
|
||||||
'''
|
'''
|
||||||
sh '''#!/bin/bash
|
sh '''#!/bin/bash
|
||||||
source ~/.profile
|
fnm install 20.15.1
|
||||||
nvm install 20.15.1
|
fnm use default
|
||||||
nvm use default
|
|
||||||
# Restore all projects
|
# Restore all projects
|
||||||
dotnet restore Props/Props.csproj
|
dotnet restore Props/Props.csproj
|
||||||
dotnet restore Props.Tests/Props.Tests.csproj
|
dotnet restore Props.Tests/Props.Tests.csproj
|
||||||
@ -32,8 +31,7 @@ pipeline {
|
|||||||
stage("Test") {
|
stage("Test") {
|
||||||
steps {
|
steps {
|
||||||
sh '''#!/bin/bash
|
sh '''#!/bin/bash
|
||||||
source ~/.profile
|
dotnet test --logger xunit --no-restore Props.Shop/Adafruit.Tests/Props.Shop.Adafruit.Tests.csproj
|
||||||
dotnet test --logger xunit --no-restore Props.Shop/Props.Shop.sln
|
|
||||||
'''
|
'''
|
||||||
xunit([xUnitDotNet(excludesPattern: '', pattern: 'Props.Shop/*.Tests/TestResults/*.xml', stopProcessingIfError: true)])
|
xunit([xUnitDotNet(excludesPattern: '', pattern: 'Props.Shop/*.Tests/TestResults/*.xml', stopProcessingIfError: true)])
|
||||||
}
|
}
|
||||||
@ -41,12 +39,10 @@ pipeline {
|
|||||||
stage("Publish") {
|
stage("Publish") {
|
||||||
steps {
|
steps {
|
||||||
sh '''#!/bin/bash
|
sh '''#!/bin/bash
|
||||||
source ~/.profile
|
|
||||||
dotnet publish --configuration Release --output output/shop-modules Props.Shop/Props.Shop.sln
|
dotnet publish --configuration Release --output output/shop-modules Props.Shop/Props.Shop.sln
|
||||||
'''
|
'''
|
||||||
fingerprint 'output/shop-modules/**/Props.Shop.*'
|
fingerprint 'output/shop-modules/**/Props.Shop.*'
|
||||||
sh '''#!/bin/bash
|
sh '''#!/bin/bash
|
||||||
source ~/.profile
|
|
||||||
cp ./Props.Shop/output/shop-modules/**/*.dll ./Props.Shop/output/shop-modules/**/*.deps.json ./Props/shops/.
|
cp ./Props.Shop/output/shop-modules/**/*.dll ./Props.Shop/output/shop-modules/**/*.deps.json ./Props/shops/.
|
||||||
'''
|
'''
|
||||||
}
|
}
|
||||||
@ -58,7 +54,6 @@ pipeline {
|
|||||||
stage("Test") {
|
stage("Test") {
|
||||||
steps {
|
steps {
|
||||||
sh '''#!/bin/bash
|
sh '''#!/bin/bash
|
||||||
source ~/.profile
|
|
||||||
dotnet test --logger xunit --no-restore Props.Tests
|
dotnet test --logger xunit --no-restore Props.Tests
|
||||||
'''
|
'''
|
||||||
xunit([xUnitDotNet(excludesPattern: '', pattern: 'Props.Tests/TestResults/*.xml', stopProcessingIfError: true)])
|
xunit([xUnitDotNet(excludesPattern: '', pattern: 'Props.Tests/TestResults/*.xml', stopProcessingIfError: true)])
|
||||||
@ -67,7 +62,6 @@ pipeline {
|
|||||||
stage("Publish") {
|
stage("Publish") {
|
||||||
steps {
|
steps {
|
||||||
sh '''#!/bin/bash
|
sh '''#!/bin/bash
|
||||||
source ~/.profile
|
|
||||||
dotnet publish --configuration Release --output output/props/props-linux-x64 --runtime linux-x64 --self-contained Props
|
dotnet publish --configuration Release --output output/props/props-linux-x64 --runtime linux-x64 --self-contained Props
|
||||||
dotnet publish --configuration Release --output output/props/props-win-x64 --runtime win-x64 --self-contained Props
|
dotnet publish --configuration Release --output output/props/props-win-x64 --runtime win-x64 --self-contained Props
|
||||||
'''
|
'''
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net7.0</TargetFramework>
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
<InvariantGlobalization>true</InvariantGlobalization>
|
<InvariantGlobalization>true</InvariantGlobalization>
|
||||||
<IsPackable>false</IsPackable>
|
<IsPackable>false</IsPackable>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="MartinCostello.Logging.XUnit" Version="0.2.0" />
|
<PackageReference Include="MartinCostello.Logging.XUnit" Version="0.2.0" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Logging" Version="6.0.0" />
|
<PackageReference Include="Microsoft.Extensions.Logging" Version="8.0.0" />
|
||||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.0.0" />
|
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.0.0" />
|
||||||
<PackageReference Include="System.Linq.Async" Version="5.1.0" />
|
<PackageReference Include="System.Linq.Async" Version="5.1.0" />
|
||||||
<PackageReference Include="xunit" Version="2.4.1" />
|
<PackageReference Include="xunit" Version="2.4.1" />
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net7.0</TargetFramework>
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
<InvariantGlobalization>true</InvariantGlobalization>
|
<InvariantGlobalization>true</InvariantGlobalization>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net7.0</TargetFramework>
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net7.0</TargetFramework>
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
<InvariantGlobalization>true</InvariantGlobalization>
|
<InvariantGlobalization>true</InvariantGlobalization>
|
||||||
<IsPackable>false</IsPackable>
|
<IsPackable>false</IsPackable>
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
<!-- Publish arguments: https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-publish -->
|
<!-- Publish arguments: https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-publish -->
|
||||||
<!-- Single file docs: https://docs.microsoft.com/en-us/dotnet/core/deploying/single-file/overview -->
|
<!-- Single file docs: https://docs.microsoft.com/en-us/dotnet/core/deploying/single-file/overview -->
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net7.0</TargetFramework>
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
<PublishSingleFile>true</PublishSingleFile>
|
<PublishSingleFile>true</PublishSingleFile>
|
||||||
<SelfContained>true</SelfContained>
|
<SelfContained>true</SelfContained>
|
||||||
<PublishTrimmed>false</PublishTrimmed>
|
<PublishTrimmed>false</PublishTrimmed>
|
||||||
|
Loading…
Reference in New Issue
Block a user