Skip to content

Commit

Permalink
Merge pull request #197 from Color-Chan/feature/dotnet8
Browse files Browse the repository at this point in the history
Upgraded to dotnet8
  • Loading branch information
BrammyS authored Nov 15, 2023
2 parents e2d06cc + a5259f3 commit 7d10579
Show file tree
Hide file tree
Showing 69 changed files with 94 additions and 180 deletions.
8 changes: 4 additions & 4 deletions .github/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@ Color-Chan.Discord is a powerful Discord library made to communicate with the [D

### Built With

* [.NET 7](https://dotnet.microsoft.com/download/dotnet/7.0)
* [ASP.NET](https://docs.microsoft.com/en-us/aspnet/core/?view=aspnetcore-7.0)
* [.NET 8](https://dotnet.microsoft.com/download/dotnet/8.0)
* [ASP.NET](https://docs.microsoft.com/en-us/aspnet/core/?view=aspnetcore-8.0)


<!-- GETTING STARTED -->
Expand All @@ -93,8 +93,8 @@ To get a local copy up and running follow these simple steps.

### Prerequisites

* [.NET 7](https://dotnet.microsoft.com/download/dotnet/7.0)
* [ASP.NET](https://docs.microsoft.com/en-us/aspnet/core/?view=aspnetcore-7.0)
* [.NET 8](https://dotnet.microsoft.com/download/dotnet/8.0)
* [ASP.NET](https://docs.microsoft.com/en-us/aspnet/core/?view=aspnetcore-8.0)

### Installation

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- name: Setup .NET SDK
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.0.x
dotnet-version: 8.0.x

- name: Install dependencies
run: dotnet restore
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: Setup .NET SDK
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.0.x
dotnet-version: 8.0.x

- name: Install dependencies
run: dotnet restore
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- name: Setup .NET SDK
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.0.x
dotnet-version: 8.0.x

- name: Set VERSION variable from tag
run: echo "VERSION=${GITHUB_REF/refs\/tags\/v/}" >> $GITHUB_ENV
Expand Down
2 changes: 1 addition & 1 deletion samples/ButtonArgs/ButtonArgs.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<IsPackable>false</IsPackable>
<UserSecretsId>3c72aee8-c02f-4ad5-9bf6-6bf2cd2be934</UserSecretsId>
Expand Down
8 changes: 4 additions & 4 deletions samples/ButtonArgs/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Setup base image
FROM mcr.microsoft.com/dotnet/sdk:7.0-alpine AS base
FROM mcr.microsoft.com/dotnet/sdk:8.0-alpine AS base

LABEL maintainer="BrammyS <https://github.com/BrammyS>"
LABEL org.label-schema.name="ButtonArgs"
Expand All @@ -11,18 +11,18 @@ COPY . .
WORKDIR /samples/ButtonArgs

# Restore dependencies
RUN dotnet restore "ButtonArgs.csproj" --runtime alpine-x64
RUN dotnet restore "ButtonArgs.csproj" --runtime linux-musl-x64

# Publish the application
RUN dotnet publish "ButtonArgs.csproj" \
-c Release -o /app/publish \
--no-restore \
--runtime alpine-x64 \
--runtime linux-musl-x64 \
--self-contained true \
/p:PublishSingleFile=true

# Setup final runtime image
FROM mcr.microsoft.com/dotnet/runtime-deps:7.0-alpine AS final
FROM mcr.microsoft.com/dotnet/runtime-deps:8.0-alpine AS final

# Create a user to run the application
RUN adduser --disabled-password \
Expand Down
8 changes: 4 additions & 4 deletions samples/HelloWorldButton/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Setup base image
FROM mcr.microsoft.com/dotnet/sdk:7.0-alpine AS base
FROM mcr.microsoft.com/dotnet/sdk:8.0-alpine AS base

LABEL maintainer="BrammyS <https://github.com/BrammyS>"
LABEL org.label-schema.name="HelloWorldButton"
Expand All @@ -11,18 +11,18 @@ COPY . .
WORKDIR /samples/HelloWorldButton

# Restore dependencies
RUN dotnet restore "HelloWorldButton.csproj" --runtime alpine-x64
RUN dotnet restore "HelloWorldButton.csproj" --runtime linux-musl-x64

# Publish the application
RUN dotnet publish "HelloWorldButton.csproj" \
-c Release -o /app/publish \
--no-restore \
--runtime alpine-x64 \
--runtime linux-musl-x64 \
--self-contained true \
/p:PublishSingleFile=true

# Setup final runtime image
FROM mcr.microsoft.com/dotnet/runtime-deps:7.0-alpine AS final
FROM mcr.microsoft.com/dotnet/runtime-deps:8.0-alpine AS final

# Create a user to run the application
RUN adduser --disabled-password \
Expand Down
2 changes: 1 addition & 1 deletion samples/HelloWorldButton/HelloWorldButton.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<IsPackable>false</IsPackable>
<UserSecretsId>fe482994-aceb-4c88-a9fe-9a5a2f516974</UserSecretsId>
Expand Down
8 changes: 4 additions & 4 deletions samples/Pong/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Setup base image
FROM mcr.microsoft.com/dotnet/sdk:7.0-alpine AS base
FROM mcr.microsoft.com/dotnet/sdk:8.0-alpine AS base

LABEL maintainer="BrammyS <https://github.com/BrammyS>"
LABEL org.label-schema.name="Pong"
Expand All @@ -11,18 +11,18 @@ COPY . .
WORKDIR /samples/Pong

# Restore dependencies
RUN dotnet restore "Pong.csproj" --runtime alpine-x64
RUN dotnet restore "Pong.csproj" --runtime linux-musl-x64

# Publish the application
RUN dotnet publish "Pong.csproj" \
-c Release -o /app/publish \
--no-restore \
--runtime alpine-x64 \
--runtime linux-musl-x64 \
--self-contained true \
/p:PublishSingleFile=true

# Setup final runtime image
FROM mcr.microsoft.com/dotnet/runtime-deps:7.0-alpine AS final
FROM mcr.microsoft.com/dotnet/runtime-deps:8.0-alpine AS final

# Create a user to run the application
RUN adduser --disabled-password \
Expand Down
2 changes: 1 addition & 1 deletion samples/Pong/Pong.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<IsPackable>false</IsPackable>
<UserSecretsId>83cbda5f-eb93-49b2-8ee5-0ab83422e142</UserSecretsId>
Expand Down
8 changes: 4 additions & 4 deletions samples/RoleManager/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Setup base image
FROM mcr.microsoft.com/dotnet/sdk:7.0-alpine AS base
FROM mcr.microsoft.com/dotnet/sdk:8.0-alpine AS base

LABEL maintainer="BrammyS <https://github.com/BrammyS>"
LABEL org.label-schema.name="RoleManager"
Expand All @@ -11,18 +11,18 @@ COPY . .
WORKDIR /samples/RoleManager

# Restore dependencies
RUN dotnet restore "RoleManager.csproj" --runtime alpine-x64
RUN dotnet restore "RoleManager.csproj" --runtime linux-musl-x64

# Publish the application
RUN dotnet publish "RoleManager.csproj" \
-c Release -o /app/publish \
--no-restore \
--runtime alpine-x64 \
--runtime linux-musl-x64 \
--self-contained true \
/p:PublishSingleFile=true

# Setup final runtime image
FROM mcr.microsoft.com/dotnet/runtime-deps:7.0-alpine AS final
FROM mcr.microsoft.com/dotnet/runtime-deps:8.0-alpine AS final

# Create a user to run the application
RUN adduser --disabled-password \
Expand Down
2 changes: 1 addition & 1 deletion samples/RoleManager/RoleManager.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<IsPackable>false</IsPackable>
<UserSecretsId>72f45dfc-6b7d-4fd4-a992-4b8055771ed5</UserSecretsId>
Expand Down
10 changes: 5 additions & 5 deletions src/Color-Chan.Discord.Caching/Color-Chan.Discord.Caching.csproj
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<RootNamespace>Color_Chan.Discord.Caching</RootNamespace>
<Nullable>enable</Nullable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="7.0.0"/>
<PackageReference Include="Microsoft.Extensions.Caching.StackExchangeRedis" Version="7.0.13"/>
<PackageReference Include="Microsoft.Extensions.Options" Version="7.0.1"/>
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Caching.StackExchangeRedis" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Options" Version="8.0.0" />
</ItemGroup>

<PropertyGroup>
<Title>Color-Chan.Discord.Chaching</Title>
<Authors>BrammyS</Authors>
<Copyright>BrammyS 2021</Copyright>
<Description>A Discord library made for slash commands. Using Discord webhooks and .NET 5.</Description>
<Description>A Discord library made for slash commands. Using Discord webhooks and .NET 8.</Description>

<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
Expand Down
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>
<RootNamespace>Color_Chan.Discord.Commands</RootNamespace>
<Nullable>enable</Nullable>
</PropertyGroup>
Expand All @@ -21,7 +21,7 @@
<Title>Color-Chan.Discord.Commands</Title>
<Authors>BrammyS</Authors>
<Copyright>BrammyS 2021</Copyright>
<Description>A Discord library made for slash commands. Using Discord webhooks and .NET 5.</Description>
<Description>A Discord library made for slash commands. Using Discord webhooks and .NET 8.</Description>

<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
Expand Down
6 changes: 3 additions & 3 deletions src/Color-Chan.Discord.Core/Color-Chan.Discord.Core.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>
<RootNamespace>Color_Chan.Discord.Core</RootNamespace>
<Nullable>enable</Nullable>
</PropertyGroup>
Expand All @@ -11,7 +11,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Http.Polly" Version="7.0.13" />
<PackageReference Include="Microsoft.Extensions.Http.Polly" Version="8.0.0" />
</ItemGroup>

<ItemGroup>
Expand All @@ -22,7 +22,7 @@
<Title>Color-Chan.Discord.Core</Title>
<Authors>BrammyS</Authors>
<Copyright>BrammyS 2021</Copyright>
<Description>A Discord library made for slash commands. Using Discord webhooks and .NET 5.</Description>
<Description>A Discord library made for slash commands. Using Discord webhooks and .NET 8.</Description>

<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
Expand Down
4 changes: 2 additions & 2 deletions src/Color-Chan.Discord.Rest/Color-Chan.Discord.Rest.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>
<RootNamespace>Color_Chan.Discord.Rest</RootNamespace>
<Nullable>enable</Nullable>
</PropertyGroup>
Expand All @@ -24,7 +24,7 @@
<Title>Color-Chan.Discord.Rest</Title>
<Authors>BrammyS</Authors>
<Copyright>BrammyS 2021</Copyright>
<Description>A Discord library made for slash commands. Using Discord webhooks and .NET 5.</Description>
<Description>A Discord library made for slash commands. Using Discord webhooks and .NET 8.</Description>

<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
Expand Down
4 changes: 2 additions & 2 deletions src/Color-Chan.Discord/Color-Chan.Discord.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>
<RootNamespace>Color_Chan.Discord</RootNamespace>
<Nullable>enable</Nullable>
<Product>Color-Chan.Discord</Product>
Expand All @@ -25,7 +25,7 @@
<Title>Color-Chan.Discord</Title>
<Authors>BrammyS</Authors>
<Copyright>BrammyS 2021</Copyright>
<Description>A Discord library made for slash commands. Using Discord webhooks and .NET 5.</Description>
<Description>A Discord library made for slash commands. Using Discord webhooks and .NET 8.</Description>

<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
Expand Down
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>
<RootNamespace>Color_Chan.Discord.Caching.Tests</RootNamespace>
<IsPackable>false</IsPackable>
<Nullable>enable</Nullable>
Expand Down
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>
<RootNamespace>Color_Chan.Discord.Commands.Tests</RootNamespace>
<Nullable>enable</Nullable>
<IsPackable>false</IsPackable>
Expand Down
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>
<RootNamespace>Color_Chan.Discord.Core.Tests</RootNamespace>
<Nullable>enable</Nullable>
<IsPackable>false</IsPackable>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,4 @@
namespace Color_Chan.Discord.Core.Tests.Common.API.DataModels.Application;

[TestFixture]
public class DiscordApplicationCommandDataTests : JsonTestBase<DiscordApplicationCommandData>
{
}
public class DiscordApplicationCommandDataTests : JsonTestBase<DiscordApplicationCommandData>;
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,4 @@
namespace Color_Chan.Discord.Core.Tests.Common.API.DataModels.Application;

[TestFixture]
public class DiscordApplicationCommandOptionChoiceDataTests : JsonTestBase<DiscordApplicationCommandOptionChoiceData>
{
}
public class DiscordApplicationCommandOptionChoiceDataTests : JsonTestBase<DiscordApplicationCommandOptionChoiceData>;
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,4 @@
namespace Color_Chan.Discord.Core.Tests.Common.API.DataModels.Application;

[TestFixture]
public class DiscordApplicationCommandOptionDataTests : JsonTestBase<DiscordApplicationCommandOptionData>
{
}
public class DiscordApplicationCommandOptionDataTests : JsonTestBase<DiscordApplicationCommandOptionData>;
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,4 @@
namespace Color_Chan.Discord.Core.Tests.Common.API.DataModels;

[TestFixture]
public class DiscordEmojiDataTests : JsonTestBase<DiscordEmojiData>
{
}
public class DiscordEmojiDataTests : JsonTestBase<DiscordEmojiData>;
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,4 @@
namespace Color_Chan.Discord.Core.Tests.Common.API.DataModels;

[TestFixture]
public class DiscordGatewayBotDataTests : JsonTestBase<DiscordGatewayBotData>
{
}
public class DiscordGatewayBotDataTests : JsonTestBase<DiscordGatewayBotData>;
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,4 @@
namespace Color_Chan.Discord.Core.Tests.Common.API.DataModels;

[TestFixture]
public class DiscordPermissionTests : JsonTestBase<DiscordPermission>
{
}
public class DiscordPermissionTests : JsonTestBase<DiscordPermission>;
Loading

0 comments on commit 7d10579

Please sign in to comment.