Skip to content

Commit d9c2aae

Browse files
committed
feat(api): v4
- Removes v1 and v2 APIs
1 parent 71cc6e1 commit d9c2aae

File tree

9 files changed

+28
-308
lines changed

9 files changed

+28
-308
lines changed

.github/workflows/docker.yml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
name: Deploy Docker Image
22

33
on:
4-
release:
5-
types: [published]
64
push:
5+
tags:
6+
- "v*"
77
branches: [main]
88
paths:
99
- "ExportAPI/**"
@@ -25,12 +25,20 @@ jobs:
2525
git submodule sync --recursive
2626
git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1
2727
28+
# if the commit is tagged, use the tag as the image tag
29+
- name: Set image tag
30+
id: image_tag
31+
run: |
32+
if [[ $GITHUB_REF == refs/tags/* ]]; then
33+
echo "::set-output name=tag::${GITHUB_REF#refs/tags/}"
34+
fi
35+
2836
- name: Build
2937
id: build
3038
uses: redhat-actions/buildah-build@v2
3139
with:
3240
image: fyko/export-api
33-
tags: latest ${{ github.sha }}
41+
tags: latest ${{ steps.image_tag.outputs.tag || '' }} ${{ github.sha }}
3442
dockerfiles: |
3543
./Dockerfile
3644
build-args: |

.vscode/launch.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"request": "launch",
1111
"preLaunchTask": "build",
1212
// If you have changed target frameworks, make sure to update the program path.
13-
"program": "${workspaceFolder}/ExportAPI/bin/Debug/netcoreapp3.1/ExportAPI.dll",
13+
"program": "${workspaceFolder}/ExportAPI/bin/Debug/net6.0/ExportAPI.dll",
1414
"args": [],
1515
"cwd": "${workspaceFolder}/ExportAPI",
1616
"stopAtEntry": false,
@@ -33,4 +33,4 @@
3333
"processId": "${command:pickProcess}"
3434
}
3535
]
36-
}
36+
}

DiscordChatExporter

Submodule DiscordChatExporter updated 139 files

ExportAPI/Controllers/v1/ExportController.cs

Lines changed: 0 additions & 126 deletions
This file was deleted.

ExportAPI/Controllers/v2/ExportController.cs

Lines changed: 0 additions & 157 deletions
This file was deleted.

ExportAPI/ExportAPI.csproj

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,25 @@
11
<Project Sdk="Microsoft.NET.Sdk.Web">
22
<PropertyGroup>
33
<TargetFramework>net6.0</TargetFramework>
4-
<Version>3.0.0</Version>
4+
<Version>4.0.0</Version>
55
</PropertyGroup>
66

77
<ItemGroup>
88
<ProjectReference Include="..\DiscordChatExporter\DiscordChatExporter.Core\DiscordChatExporter.Core.csproj" />
9-
<Protobuf Include="Protos\export.proto" GrpcServices="Server" />
9+
<Protobuf Include="Protos\export.proto" GrpcServices="Server" Link="Protos\export.proto" />
1010
</ItemGroup>
1111

1212
<ItemGroup>
13-
<PackageReference Include="Calzolari.Grpc.AspNetCore.Validation" Version="6.1.1" />
13+
<!-- <PackageReference Include="Calzolari.Grpc.AspNetCore.Validation" Version="6.1.1" /> -->
1414
<PackageReference Include="FluentValidation" Version="10.3.6" />
15-
<PackageReference Include="Grpc.AspNetCore" Version="2.43.0-pre1" />
16-
<PackageReference Include="Grpc.AspNetCore.Server.Reflection" Version="2.43.0-pre1" />
15+
<PackageReference Include="Grpc.AspNetCore" Version="2.50.0" />
16+
<PackageReference Include="Grpc.AspNetCore.Server.Reflection" Version="2.50.0" />
1717
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
1818
<PackageReference Include="Gress" Version="2.0.1" />
19+
<PackageReference Include="Grpc.Tools" Version="2.50.0">
20+
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
21+
<PrivateAssets>all</PrivateAssets>
22+
</PackageReference>
1923
</ItemGroup>
2024

2125
</Project>

ExportAPI/Program.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
using Microsoft.AspNetCore.Hosting;
22
using Microsoft.Extensions.Hosting;
3-
using Microsoft.AspNetCore.Server.Kestrel.Core;
43

54
namespace ExportAPI
65
{

0 commit comments

Comments
 (0)