Skip to content

Commit 125adb9

Browse files
committed
Reference package instead of project in samples
1 parent bb0fb98 commit 125adb9

File tree

6 files changed

+28
-22
lines changed

6 files changed

+28
-22
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,14 +70,14 @@ jobs:
7070
exit 1
7171
fi
7272
73-
- name: Build samples
74-
run: just build-samples --configuration Release
75-
7673
- name: Pack
7774
run: just pack --configuration Release
7875
env:
7976
MINVERBUILDMETADATA: ${{ env.GITHUB_RUN_NUMBER }}
8077

78+
- name: Build samples
79+
run: just build-samples --configuration Release
80+
8181
- name: Publish package artifact
8282
uses: actions/upload-artifact@v4
8383
with:

Directory.Build.targets

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,9 @@
11
<Project>
2-
<PropertyGroup>
3-
<BuildDependsOn>
4-
CleanPackages;
5-
$(BuildDependsOn)
6-
</BuildDependsOn>
7-
</PropertyGroup>
8-
9-
<Target Name="CleanPackages" Condition="'$(PackageId)' != ''">
10-
<ItemGroup>
11-
<_OldPackages Include="$(PackageOutputPath)/$(PackageId)*" />
12-
</ItemGroup>
2+
<ItemGroup>
3+
<_OldPackages Include="$(PackageOutputPath)/$(PackageId)*" />
4+
</ItemGroup>
135

6+
<Target Name="CleanPackages" Condition="'$(PackageId)' != ''" AfterTargets="Pack">
147
<Delete Files="@(_OldPackages)" />
158
</Target>
169
</Project>

samples/Samples.DateInput/Samples.DateInput.csproj

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,8 @@
55
</PropertyGroup>
66

77
<ItemGroup>
8+
<PackageReference Include="GovUk.Frontend.AspNetCore" Version="3.2.*-*" />
89
<PackageReference Include="NodaTime" Version="3.0.5" />
910
</ItemGroup>
1011

11-
<ItemGroup>
12-
<ProjectReference Include="..\..\src\GovUk.Frontend.AspNetCore\GovUk.Frontend.AspNetCore.csproj" />
13-
</ItemGroup>
14-
1512
</Project>

samples/Samples.MvcStarter/Samples.MvcStarter.csproj

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,8 @@
66
</PropertyGroup>
77

88
<ItemGroup>
9+
<PackageReference Include="GovUk.Frontend.AspNetCore" Version="3.2.*-*" />
910
<PackageReference Include="Joonasw.AspNetCore.SecurityHeaders" Version="4.0.1" />
1011
</ItemGroup>
1112

12-
<ItemGroup>
13-
<ProjectReference Include="..\..\src\GovUk.Frontend.AspNetCore\GovUk.Frontend.AspNetCore.csproj" />
14-
</ItemGroup>
15-
1613
</Project>

samples/Samples.sln

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Samples.DateInput", "Sample
77
EndProject
88
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Samples.MvcStarter", "Samples.MvcStarter\Samples.MvcStarter.csproj", "{5C74E1B9-459A-43CD-8B93-164DBCD0B047}"
99
EndProject
10+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{C8202507-F5B1-46FC-85EF-56A9BE1ADB87}"
11+
ProjectSection(SolutionItems) = preProject
12+
nuget.config = nuget.config
13+
EndProjectSection
14+
EndProject
1015
Global
1116
GlobalSection(SolutionConfigurationPlatforms) = preSolution
1217
Debug|Any CPU = Debug|Any CPU

samples/nuget.config

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<configuration>
3+
<packageSources>
4+
<add key="local" value="../packages" />
5+
</packageSources>
6+
<packageSourceMapping>
7+
<packageSource key="nuget.org">
8+
<package pattern="*" />
9+
</packageSource>
10+
<packageSource key="local">
11+
<package pattern="GovUk.Frontend.AspNetCore" />
12+
</packageSource>
13+
</packageSourceMapping>
14+
</configuration>

0 commit comments

Comments
 (0)