Skip to content

Commit

Permalink
Move libman restore into explicit step (#1263)
Browse files Browse the repository at this point in the history
  • Loading branch information
gunndabad authored Apr 4, 2024
1 parent e848e83 commit f0c2304
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 9 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,7 @@ jobs:
run: just install-tools

- name: Restore
run: dotnet restore
working-directory: TeachingRecordSystem
run: just restore

- name: Lint
run: |
Expand Down
6 changes: 6 additions & 0 deletions TeachingRecordSystem/.config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@
"commands": [
"dotnet-ef"
]
},
"microsoft.web.librarymanager.cli": {
"version": "2.1.175",
"commands": [
"libman"
]
}
}
}
3 changes: 1 addition & 2 deletions TeachingRecordSystem/Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@
<PackageVersion Include="Microsoft.Playwright" Version="1.41.2" />
<PackageVersion Include="Microsoft.PowerPlatform.Dataverse.Client" Version="1.1.16" />
<PackageVersion Include="Microsoft.PowerPlatform.Dataverse.Client.Dynamics" Version="1.1.16" />
<PackageVersion Include="Microsoft.Web.LibraryManager.Build" Version="2.1.175" />
<PackageVersion Include="Moq" Version="4.20.70" />
<PackageVersion Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="8.0.0" />
<PackageVersion Include="OpenIddict.AspNetCore" Version="5.2.0" />
Expand Down Expand Up @@ -92,4 +91,4 @@
<PackageVersion Include="Xunit.DependencyInjection" Version="8.9.1" />
<PackageVersion Include="xunit.runner.visualstudio" Version="2.5.7" />
</ItemGroup>
</Project>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
<PackageReference Include="GovUk.OneLogin.AspNetCore" />
<PackageReference Include="Joonasw.AspNetCore.SecurityHeaders" />
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" />
<PackageReference Include="Microsoft.Web.LibraryManager.Build" />
<PackageReference Include="OpenIddict.AspNetCore" />
<PackageReference Include="Sentry.AspNetCore" />
<PackageReference Include="Serilog.AspNetCore" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
<PackageReference Include="Microsoft.Identity.Web" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.OpenIdConnect" />
<PackageReference Include="Microsoft.Identity.Web.GraphServiceClientBeta" />
<PackageReference Include="Microsoft.Web.LibraryManager.Build" />
<PackageReference Include="Sentry.AspNetCore" />
<PackageReference Include="Serilog.AspNetCore" />
</ItemGroup>
Expand Down
11 changes: 8 additions & 3 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -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}}
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit f0c2304

Please sign in to comment.