From f0c23046455bad87d875068fa3fc5370b866de9c Mon Sep 17 00:00:00 2001 From: James Gunn Date: Thu, 4 Apr 2024 18:37:18 +0100 Subject: [PATCH] Move libman restore into explicit step (#1263) --- .github/workflows/pr.yml | 3 +-- TeachingRecordSystem/.config/dotnet-tools.json | 6 ++++++ TeachingRecordSystem/Directory.Packages.props | 3 +-- .../TeachingRecordSystem.AuthorizeAccess.csproj | 1 - .../TeachingRecordSystem.SupportUi.csproj | 1 - justfile | 11 ++++++++--- 6 files changed, 16 insertions(+), 9 deletions(-) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index a20e64978..d689d58ae 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -43,8 +43,7 @@ jobs: run: just install-tools - name: Restore - run: dotnet restore - working-directory: TeachingRecordSystem + run: just restore - name: Lint run: | diff --git a/TeachingRecordSystem/.config/dotnet-tools.json b/TeachingRecordSystem/.config/dotnet-tools.json index 5d4419e3b..6c009ec1d 100644 --- a/TeachingRecordSystem/.config/dotnet-tools.json +++ b/TeachingRecordSystem/.config/dotnet-tools.json @@ -13,6 +13,12 @@ "commands": [ "dotnet-ef" ] + }, + "microsoft.web.librarymanager.cli": { + "version": "2.1.175", + "commands": [ + "libman" + ] } } } \ No newline at end of file diff --git a/TeachingRecordSystem/Directory.Packages.props b/TeachingRecordSystem/Directory.Packages.props index 21dae4b09..e4a378b66 100644 --- a/TeachingRecordSystem/Directory.Packages.props +++ b/TeachingRecordSystem/Directory.Packages.props @@ -59,7 +59,6 @@ - @@ -92,4 +91,4 @@ - \ No newline at end of file + diff --git a/TeachingRecordSystem/src/TeachingRecordSystem.AuthorizeAccess/TeachingRecordSystem.AuthorizeAccess.csproj b/TeachingRecordSystem/src/TeachingRecordSystem.AuthorizeAccess/TeachingRecordSystem.AuthorizeAccess.csproj index 9a2fd2c7e..fdee53a71 100644 --- a/TeachingRecordSystem/src/TeachingRecordSystem.AuthorizeAccess/TeachingRecordSystem.AuthorizeAccess.csproj +++ b/TeachingRecordSystem/src/TeachingRecordSystem.AuthorizeAccess/TeachingRecordSystem.AuthorizeAccess.csproj @@ -13,7 +13,6 @@ - diff --git a/TeachingRecordSystem/src/TeachingRecordSystem.SupportUi/TeachingRecordSystem.SupportUi.csproj b/TeachingRecordSystem/src/TeachingRecordSystem.SupportUi/TeachingRecordSystem.SupportUi.csproj index a67aa72c1..a64eb76f9 100644 --- a/TeachingRecordSystem/src/TeachingRecordSystem.SupportUi/TeachingRecordSystem.SupportUi.csproj +++ b/TeachingRecordSystem/src/TeachingRecordSystem.SupportUi/TeachingRecordSystem.SupportUi.csproj @@ -18,7 +18,6 @@ - diff --git a/justfile b/justfile index 2a1aced20..6e1bdf240 100644 --- a/justfile +++ b/justfile @@ -12,6 +12,12 @@ install-tools: @cd {{solution-root}} && dotnet tool restore npm install -g sass +# Restore dependencies +restore: + @cd {{solution-root}} && dotnet restore + @cd {{solution-root / "src" / "TeachingRecordSystem.SupportUi" }} && dotnet libman restore + @cd {{solution-root / "src" / "TeachingRecordSystem.AuthorizeAccess" }} && dotnet libman restore + # Run the trscli cli *ARGS: @cd {{solution-root / "src" / "TeachingRecordSystem.Cli"}} && dotnet {{"bin" / "Debug" / "net8.0" / "trscli.dll"}} {{ARGS}} @@ -77,9 +83,8 @@ watch-worker: @cd {{solution-root / "src" / "TeachingRecordSystem.Worker"}} && dotnet watch # Build the Docker image -docker-build *ARGS: - npm install -g sass - @cd {{solution-root}} && dotnet publish -c Release +docker-build *ARGS: install-tools restore + @cd {{solution-root}} && dotnet publish -c Release --no-restore @cd {{solution-root}} && docker build . {{ARGS}} # Set a configuration entry in user secrets for running the apps