|
1 | | -<Project Sdk="Microsoft.NET.Sdk.Razor" InitialTargets="InstallGovUkFrontendPackage"> |
| 1 | +<Project Sdk="Microsoft.NET.Sdk.Razor" InitialTargets="InstallGovUkFrontendPackage;WriteGovUkFrontendVersionFile"> |
2 | 2 |
|
3 | 3 | <PropertyGroup> |
4 | 4 | <TargetFrameworks>net8.0</TargetFrameworks> |
|
26 | 26 | <GeneratePackageOnBuild>true</GeneratePackageOnBuild> |
27 | 27 | </PropertyGroup> |
28 | 28 |
|
29 | | - <UsingTask TaskName="GovUk.Frontend.AspNetCore.Build.DownloadNpmPackage" |
| 29 | + <UsingTask |
| 30 | + TaskName="GovUk.Frontend.AspNetCore.Build.DownloadNpmPackage" |
30 | 31 | AssemblyFile="../GovUk.Frontend.AspNetCore.Build/bin/net8.0/GovUk.Frontend.AspNetCore.Build.dll" /> |
31 | 32 |
|
32 | 33 | <Target Name="InstallGovUkFrontendPackage" Condition="!Exists('$(GovUkFrontendLibrary)')"> |
|
35 | 36 | <GovUk.Frontend.AspNetCore.Build.DownloadNpmPackage |
36 | 37 | Package="govuk-frontend" |
37 | 38 | Version="$(GovUkFrontendVersion)" |
38 | | - PackageBaseDirectory="/dist/govuk" |
| 39 | + PackageBaseDirectory="dist/govuk" |
39 | 40 | DestinationDirectory="$(GovUkFrontendLibrary)" /> |
40 | 41 | </Target> |
41 | 42 |
|
| 43 | + <Target Name="WriteGovUkFrontendVersionFile"> |
| 44 | + <ItemGroup> |
| 45 | + <_VersionFileLines Include="$(GovUkFrontendVersion)" /> |
| 46 | + </ItemGroup> |
| 47 | + |
| 48 | + <WriteLinesToFile File="govuk-frontend-version.txt" Lines="@(_VersionFileLines)" Overwrite="true" /> |
| 49 | + |
| 50 | + <ItemGroup> |
| 51 | + <Content Include="govuk-frontend-version.txt" Pack="true" PackagePath="\" /> |
| 52 | + </ItemGroup> |
| 53 | + </Target> |
| 54 | + |
42 | 55 | <Target Name="CopyXmlDocToDocsProject" AfterTargets="Build"> |
43 | 56 | <ItemGroup> |
44 | 57 | <_XmlDocFile Include="$(OutputPath)GovUk.Frontend.AspNetCore.xml" /> |
45 | 58 | </ItemGroup> |
46 | 59 |
|
47 | 60 | <Copy |
48 | 61 | SourceFiles="@(_XmlDocFile)" |
49 | | - DestinationFolder="$(RepoRoot)/src/GovUk.Frontend.AspNetCore.Docs" |
| 62 | + DestinationFolder="$(RepoRoot)\src\GovUk.Frontend.AspNetCore.Docs" |
50 | 63 | Condition="Exists('%(_XmlDocFile.Identity)')"/> |
51 | 64 | </Target> |
52 | 65 |
|
|
109 | 122 | <None Include="icon.png" Pack="true" PackagePath="\" /> |
110 | 123 | </ItemGroup> |
111 | 124 |
|
| 125 | + <ItemGroup> |
| 126 | + <Content Include="GovUk.Frontend.AspNetCore.props" Pack="true" PackFolder="build" /> |
| 127 | + <Content Include="GovUk.Frontend.AspNetCore.targets" Pack="true" PackFolder="build" /> |
| 128 | + </ItemGroup> |
| 129 | + |
112 | 130 | </Project> |
0 commit comments