Skip to content

Commit

Permalink
feat(api): v4
Browse files Browse the repository at this point in the history
- Removes v1 and v2 APIs
  • Loading branch information
Fyko committed Nov 20, 2022
1 parent 71cc6e1 commit d9c2aae
Show file tree
Hide file tree
Showing 9 changed files with 28 additions and 308 deletions.
14 changes: 11 additions & 3 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: Deploy Docker Image

on:
release:
types: [published]
push:
tags:
- "v*"
branches: [main]
paths:
- "ExportAPI/**"
Expand All @@ -25,12 +25,20 @@ jobs:
git submodule sync --recursive
git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1
# if the commit is tagged, use the tag as the image tag
- name: Set image tag
id: image_tag
run: |
if [[ $GITHUB_REF == refs/tags/* ]]; then
echo "::set-output name=tag::${GITHUB_REF#refs/tags/}"
fi
- name: Build
id: build
uses: redhat-actions/buildah-build@v2
with:
image: fyko/export-api
tags: latest ${{ github.sha }}
tags: latest ${{ steps.image_tag.outputs.tag || '' }} ${{ github.sha }}
dockerfiles: |
./Dockerfile
build-args: |
Expand Down
4 changes: 2 additions & 2 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"request": "launch",
"preLaunchTask": "build",
// If you have changed target frameworks, make sure to update the program path.
"program": "${workspaceFolder}/ExportAPI/bin/Debug/netcoreapp3.1/ExportAPI.dll",
"program": "${workspaceFolder}/ExportAPI/bin/Debug/net6.0/ExportAPI.dll",
"args": [],
"cwd": "${workspaceFolder}/ExportAPI",
"stopAtEntry": false,
Expand All @@ -33,4 +33,4 @@
"processId": "${command:pickProcess}"
}
]
}
}
2 changes: 1 addition & 1 deletion DiscordChatExporter
126 changes: 0 additions & 126 deletions ExportAPI/Controllers/v1/ExportController.cs

This file was deleted.

157 changes: 0 additions & 157 deletions ExportAPI/Controllers/v2/ExportController.cs

This file was deleted.

14 changes: 9 additions & 5 deletions ExportAPI/ExportAPI.csproj
Original file line number Diff line number Diff line change
@@ -1,21 +1,25 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<Version>3.0.0</Version>
<Version>4.0.0</Version>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\DiscordChatExporter\DiscordChatExporter.Core\DiscordChatExporter.Core.csproj" />
<Protobuf Include="Protos\export.proto" GrpcServices="Server" />
<Protobuf Include="Protos\export.proto" GrpcServices="Server" Link="Protos\export.proto" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Calzolari.Grpc.AspNetCore.Validation" Version="6.1.1" />
<!-- <PackageReference Include="Calzolari.Grpc.AspNetCore.Validation" Version="6.1.1" /> -->
<PackageReference Include="FluentValidation" Version="10.3.6" />
<PackageReference Include="Grpc.AspNetCore" Version="2.43.0-pre1" />
<PackageReference Include="Grpc.AspNetCore.Server.Reflection" Version="2.43.0-pre1" />
<PackageReference Include="Grpc.AspNetCore" Version="2.50.0" />
<PackageReference Include="Grpc.AspNetCore.Server.Reflection" Version="2.50.0" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
<PackageReference Include="Gress" Version="2.0.1" />
<PackageReference Include="Grpc.Tools" Version="2.50.0">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
</ItemGroup>

</Project>
1 change: 0 additions & 1 deletion ExportAPI/Program.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Hosting;
using Microsoft.AspNetCore.Server.Kestrel.Core;

namespace ExportAPI
{
Expand Down
Loading

0 comments on commit d9c2aae

Please sign in to comment.