Skip to content

Commit

Permalink
Upgrade to .NET 8 + remove twitter
Browse files Browse the repository at this point in the history
  • Loading branch information
mythz committed Jan 16, 2024
1 parent 9236c90 commit f8c38a5
Show file tree
Hide file tree
Showing 48 changed files with 70 additions and 264 deletions.
11 changes: 5 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,13 @@ jobs:
runs-on: ubuntu-22.04
steps:
- name: checkout
uses: actions/checkout@v2.0.0
uses: actions/checkout@v3

- name: setup .net core
uses: actions/setup-dotnet@v1.7.2
- name: Setup dotnet
uses: actions/setup-dotnet@v3
with:
dotnet-version: 6.0.100
dotnet-version: '8.0'

- name: build
run: dotnet build
working-directory: .

working-directory: .
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
WORKDIR /app

COPY . .
Expand All @@ -7,7 +7,7 @@ RUN dotnet restore
WORKDIR /app/TechStacks
RUN dotnet publish -c release -o /out --no-restore

FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS runtime
FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS runtime

WORKDIR /app
COPY --from=build /out ./
Expand Down
7 changes: 1 addition & 6 deletions TechStacks.ServiceInterface/CustomAuthUserSession.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ namespace TechStacks.ServiceInterface
public class CustomUserSession : AuthUserSession
{
public string GithubProfileUrl { get; set; }
public string TwitterProfileUrl { get; set; }

public override void OnAuthenticated(IServiceBase authService, IAuthSession session, IAuthTokens tokens, Dictionary<string, string> authInfo)
{
Expand All @@ -34,12 +33,8 @@ public override void OnAuthenticated(IServiceBase authService, IAuthSession sess
GithubProfileUrl = avatarUrl;
}
}
if (authTokens.Provider.ToLower() == "twitter")
{
TwitterProfileUrl = session.GetProfileUrl().Replace("http://","https://");
}

ProfileUrl = GithubProfileUrl ?? TwitterProfileUrl;
ProfileUrl = GithubProfileUrl;

using (var db = dbFactory.OpenDbConnection())
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\TechStacks.ServiceModel\TechStacks.ServiceModel.csproj"/>
<PackageReference Include="ServiceStack" Version="6.*"/>
<PackageReference Include="ServiceStack.Server" Version="6.*"/>
<PackageReference Include="ServiceStack" Version="8.*"/>
<PackageReference Include="ServiceStack.Server" Version="8.*"/>

<!-- <ProjectReference Include="..\..\..\ServiceStack\ServiceStack\ServiceStack.OrmLite\src\ServiceStack.OrmLite\ServiceStack.OrmLite.csproj"/>-->
<!-- <ProjectReference Include="..\..\..\ServiceStack\ServiceStack\ServiceStack.Redis\src\ServiceStack.Redis\ServiceStack.Redis.csproj"/>-->
Expand Down
4 changes: 2 additions & 2 deletions TechStacks.ServiceModel/TechStacks.ServiceModel.csproj
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="ServiceStack.Interfaces" Version="6.*"/>
<PackageReference Include="ServiceStack.Interfaces" Version="8.*"/>
<!-- <ProjectReference Include="..\..\..\ServiceStack\ServiceStack\ServiceStack\src\ServiceStack.Interfaces\ServiceStack.Interfaces.csproj"/>-->
</ItemGroup>
</Project>
12 changes: 6 additions & 6 deletions TechStacks.Tests/TechStacks.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<DebugType>portable</DebugType>
<OutputType>Library</OutputType>
</PropertyGroup>
Expand All @@ -11,11 +11,11 @@
<PackageReference Include="NUnit3TestAdapter" Version="4.1.*" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.*" />

<PackageReference Include="ServiceStack" Version="6.*" />
<PackageReference Include="ServiceStack.Server" Version="6.*" />
<PackageReference Include="ServiceStack.OrmLite.PostgreSQL" Version="6.*" />
<PackageReference Include="ServiceStack.OrmLite.Sqlite.Data" Version="6.*" />
<PackageReference Include="ServiceStack.Kestrel" Version="6.*" />
<PackageReference Include="ServiceStack" Version="8.*" />
<PackageReference Include="ServiceStack.Server" Version="8.*" />
<PackageReference Include="ServiceStack.OrmLite.PostgreSQL" Version="8.*" />
<PackageReference Include="ServiceStack.OrmLite.Sqlite.Data" Version="8.*" />
<PackageReference Include="ServiceStack.Kestrel" Version="8.*" />

<!-- <ProjectReference Include="..\..\..\ServiceStack\ServiceStack\ServiceStack\src\ServiceStack.Kestrel\ServiceStack.Kestrel.csproj" />-->
<!-- <ProjectReference Include="..\..\..\ServiceStack\ServiceStack\ServiceStack.OrmLite\src\ServiceStack.OrmLite.Sqlite.Data\ServiceStack.OrmLite.Sqlite.Data.csproj" />-->
Expand Down
6 changes: 3 additions & 3 deletions TechStacks/Configure.AppHost.cs
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ SitemapFeature CreateSiteMap(IDbConnection db, string baseUrl) =>
LastModified = DateTime.UtcNow,
UrlSet = db.Select(db.From<TechnologyStack>().OrderByDescending(x => x.LastModified))
.Map(x => new SitemapUrl {
Location = baseUrl + new ClientTechnologyStack {Slug = x.Slug}.ToAbsoluteUri(),
Location = baseUrl + new ClientTechnologyStack {Slug = x.Slug}.ToGetUrl(),
LastModified = x.LastModified,
ChangeFrequency = SitemapFrequency.Weekly,
}),
Expand All @@ -254,7 +254,7 @@ SitemapFeature CreateSiteMap(IDbConnection db, string baseUrl) =>
LastModified = DateTime.UtcNow,
UrlSet = db.Select(db.From<Technology>().OrderByDescending(x => x.LastModified))
.Map(x => new SitemapUrl {
Location = baseUrl + new ClientTechnology {Slug = x.Slug}.ToAbsoluteUri(),
Location = baseUrl + new ClientTechnology {Slug = x.Slug}.ToGetUrl(),
LastModified = x.LastModified,
ChangeFrequency = SitemapFrequency.Weekly,
})
Expand All @@ -265,7 +265,7 @@ SitemapFeature CreateSiteMap(IDbConnection db, string baseUrl) =>
LastModified = DateTime.UtcNow,
UrlSet = db.Select(db.From<CustomUserAuth>().OrderByDescending(x => x.ModifiedDate))
.Map(x => new SitemapUrl {
Location = baseUrl + new ClientUser {UserName = x.UserName}.ToAbsoluteUri(),
Location = baseUrl + new ClientUser {UserName = x.UserName}.ToGetUrl(),
LastModified = x.ModifiedDate,
ChangeFrequency = SitemapFrequency.Weekly,
})
Expand Down
10 changes: 5 additions & 5 deletions TechStacks/TechStacks.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<AspNetCoreHostingModel>InProcess</AspNetCoreHostingModel>
Expand All @@ -14,10 +14,10 @@
<Content Include="emails\**\*" CopyToPublishDirectory="PreserveNewest"/>
</ItemGroup>
<ItemGroup>
<PackageReference Include="ServiceStack" Version="6.*"/>
<PackageReference Include="ServiceStack.Server" Version="6.*"/>
<PackageReference Include="ServiceStack.Api.OpenApi" Version="6.*"/>
<PackageReference Include="ServiceStack.OrmLite.PostgreSQL" Version="6.*"/>
<PackageReference Include="ServiceStack" Version="8.*"/>
<PackageReference Include="ServiceStack.Server" Version="8.*"/>
<PackageReference Include="ServiceStack.Api.OpenApi" Version="8.*"/>
<PackageReference Include="ServiceStack.OrmLite.PostgreSQL" Version="8.*"/>

<!-- <ProjectReference Include="..\..\..\ServiceStack\ServiceStack\ServiceStack\src\ServiceStack.Api.OpenApi\ServiceStack.Api.OpenApi.csproj"/>-->
<!-- <ProjectReference Include="..\..\..\ServiceStack\ServiceStack\ServiceStack.OrmLite\src\ServiceStack.OrmLite.PostgreSQL\ServiceStack.OrmLite.PostgreSQL.csproj"/>-->
Expand Down
Loading

0 comments on commit f8c38a5

Please sign in to comment.