From 7aeb6bcc2f75f7ebc614226ce1289d2fbb182804 Mon Sep 17 00:00:00 2001 From: glax <--local> Date: Thu, 18 May 2023 15:49:08 +0200 Subject: [PATCH] Added executable for testing. --- .dockerignore | 25 +++++++++++++++++++++++++ Tranga-CLI/Dockerfile | 18 ++++++++++++++++++ Tranga-CLI/Program.cs | 14 ++++++++++++++ Tranga-CLI/Tranga-CLI.csproj | 22 ++++++++++++++++++++++ 4 files changed, 79 insertions(+) create mode 100644 .dockerignore create mode 100644 Tranga-CLI/Dockerfile create mode 100644 Tranga-CLI/Program.cs create mode 100644 Tranga-CLI/Tranga-CLI.csproj diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..cd967fc --- /dev/null +++ b/.dockerignore @@ -0,0 +1,25 @@ +**/.dockerignore +**/.env +**/.git +**/.gitignore +**/.project +**/.settings +**/.toolstarget +**/.vs +**/.vscode +**/.idea +**/*.*proj.user +**/*.dbmdl +**/*.jfm +**/azds.yaml +**/bin +**/charts +**/docker-compose* +**/Dockerfile* +**/node_modules +**/npm-debug.log +**/obj +**/secrets.dev.yaml +**/values.dev.yaml +LICENSE +README.md \ No newline at end of file diff --git a/Tranga-CLI/Dockerfile b/Tranga-CLI/Dockerfile new file mode 100644 index 0000000..0d005f7 --- /dev/null +++ b/Tranga-CLI/Dockerfile @@ -0,0 +1,18 @@ +FROM mcr.microsoft.com/dotnet/runtime:7.0 AS base +WORKDIR /app + +FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build +WORKDIR /src +COPY ["Tranga-CLI/Tranga-CLI.csproj", "Tranga-CLI/"] +RUN dotnet restore "Tranga-CLI/Tranga-CLI.csproj" +COPY . . +WORKDIR "/src/Tranga-CLI" +RUN dotnet build "Tranga-CLI.csproj" -c Release -o /app/build + +FROM build AS publish +RUN dotnet publish "Tranga-CLI.csproj" -c Release -o /app/publish /p:UseAppHost=false + +FROM base AS final +WORKDIR /app +COPY --from=publish /app/publish . +ENTRYPOINT ["dotnet", "Tranga-CLI.dll"] diff --git a/Tranga-CLI/Program.cs b/Tranga-CLI/Program.cs new file mode 100644 index 0000000..4f4ea3e --- /dev/null +++ b/Tranga-CLI/Program.cs @@ -0,0 +1,14 @@ +// See https://aka.ms/new-console-template for more information +using Tranga; +using Tranga.Connectors; + +public class Program +{ + public static void Main(string[] args) + { + MangaDex mangaDexConnector = new MangaDex(); + Publication[] publications = mangaDexConnector.GetPublications(); + Console.ReadKey(); + } + +} \ No newline at end of file diff --git a/Tranga-CLI/Tranga-CLI.csproj b/Tranga-CLI/Tranga-CLI.csproj new file mode 100644 index 0000000..93908b7 --- /dev/null +++ b/Tranga-CLI/Tranga-CLI.csproj @@ -0,0 +1,22 @@ + + + + Exe + net7.0 + Tranga_CLI + enable + enable + Linux + + + + + .dockerignore + + + + + + + +