Skip to content

Commit

Permalink
Extracted the target frameworks into a single file
Browse files Browse the repository at this point in the history
  • Loading branch information
xperiandri committed Feb 15, 2024
1 parent 6e6aceb commit eededeb
Show file tree
Hide file tree
Showing 9 changed files with 51 additions and 76 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/publish_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ jobs:
- name: Set Build Version
run: |
$File = (
Select-Xml -XPath "/Project/PropertyGroup[@Label='NuGet']/Version" -Path "Directory.Build.targets"
Select-Xml -XPath "/Project/PropertyGroup[@Label='NuGet']/Version" -Path "Directory.Build.props"
)[0].Node
$version = "$($File.InnerText)-ci-$Env:GITHUB_RUN_ID"
$File.InnerText = $version
$File.OwnerDocument.Save((Join-Path $PWD.ProviderPath Directory.Build.targets))
$File.OwnerDocument.Save((Join-Path $PWD.ProviderPath Directory.Build.props))
echo "VERSION=$version" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append
shell: pwsh

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ jobs:
run: |
$version = "$env:GITHUB_REF_NAME"
$File = (
Select-Xml -XPath "/Project/PropertyGroup[@Label='NuGet']/Version" -Path "Directory.Build.targets"
Select-Xml -XPath "/Project/PropertyGroup[@Label='NuGet']/Version" -Path "Directory.Build.props"
)[0].Node
$File.InnerText = $version
$File.OwnerDocument.Save((Join-Path $PWD.ProviderPath Directory.Build.targets))
$File.OwnerDocument.Save((Join-Path $PWD.ProviderPath Directory.Build.props))
echo "VERSION=$version" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append
shell: pwsh

Expand Down
42 changes: 42 additions & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<Project>

<PropertyGroup>
<PackageTargetFrameworks>net6.0;net7.0</PackageTargetFrameworks>
<LangVersion>7.0</LangVersion>
<FSharpCoreVersion>7.0.*</FSharpCoreVersion>
<AccelerateBuildsInVisualStudio>true</AccelerateBuildsInVisualStudio>
<DisableImplicitFSharpCoreReference>true</DisableImplicitFSharpCoreReference>
<NoWarn>$(NoWarn);NU1504;NU1701</NoWarn>
<TreatWarningsAsErrors Condition="'$(Configuration)' != 'Debug'">true</TreatWarningsAsErrors>
</PropertyGroup>

<PropertyGroup Label="NuGet">
<Authors>John Bazinga, Andrii Chebukin, Jurii Chebukin, Ismael Carlos Velten, njlr, Garrett Birkel</Authors>
<Product>FSharp.Data.GraphQL</Product>
<Summary>F# implementation of Facebook GraphQL query language</Summary>

<RepoRoot>$([System.IO.Path]::GetDirectoryName($([MSBuild]::GetPathOfFileAbove('.gitignore', '$(MSBuildThisFileDirectory)'))))</RepoRoot>
<RepositoryUrl>https://github.com/fsprojects/FSharp.Data.GraphQL</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<Version>2.0.0</Version>
<PackageTags>FSharp GraphQL Relay React Middleware</PackageTags>
<PackageReadmeFile>README.md</PackageReadmeFile>
<PackageIcon>icon.png</PackageIcon>
<!--<PackageIconUrl>https://www.newtonsoft.com/content/images/nugeticon.png</PackageIconUrl>-->
<PackageProjectUrl>https://fsprojects.github.io/FSharp.Data.GraphQL</PackageProjectUrl>
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<EmbedUntrackedSources>true</EmbedUntrackedSources>

<MinVerTagPrefix>v</MinVerTagPrefix>
</PropertyGroup>

<ItemGroup>
<None Include="$(RepoRoot)\icon.png" Pack="true" PackagePath="\" />
<None Include="$(RepoRoot)\README.md" Pack="true" PackagePath="\" />
</ItemGroup>

</Project>
39 changes: 0 additions & 39 deletions Directory.Build.targets
Original file line number Diff line number Diff line change
@@ -1,42 +1,3 @@
<Project>
<Sdk Name="Microsoft.Build.CentralPackageVersions" Version="2.1.3" />

<PropertyGroup>
<LangVersion>7.0</LangVersion>
<FSharpCoreVersion>7.0.*</FSharpCoreVersion>
<AccelerateBuildsInVisualStudio>true</AccelerateBuildsInVisualStudio>
<DisableImplicitFSharpCoreReference>true</DisableImplicitFSharpCoreReference>
<NoWarn>$(NoWarn);NU1504;NU1701</NoWarn>
<TreatWarningsAsErrors Condition="'$(Configuration)' != 'Debug'">true</TreatWarningsAsErrors>
</PropertyGroup>

<PropertyGroup Label="NuGet">
<Authors>John Bazinga, Andrii Chebukin, Jurii Chebukin, Ismael Carlos Velten, njlr, Garrett Birkel</Authors>
<Product>FSharp.Data.GraphQL</Product>
<Summary>F# implementation of Facebook GraphQL query language</Summary>

<RepoRoot>$([System.IO.Path]::GetDirectoryName($([MSBuild]::GetPathOfFileAbove('.gitignore', '$(MSBuildThisFileDirectory)'))))</RepoRoot>
<RepositoryUrl>https://github.com/fsprojects/FSharp.Data.GraphQL</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<Version>2.0.0</Version>
<PackageTags>FSharp GraphQL Relay React Middleware</PackageTags>
<PackageReadmeFile>README.md</PackageReadmeFile>
<PackageIcon>icon.png</PackageIcon>
<!--<PackageIconUrl>https://www.newtonsoft.com/content/images/nugeticon.png</PackageIconUrl>-->
<PackageProjectUrl>https://fsprojects.github.io/FSharp.Data.GraphQL</PackageProjectUrl>
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<EmbedUntrackedSources>true</EmbedUntrackedSources>

<MinVerTagPrefix>v</MinVerTagPrefix>
</PropertyGroup>

<ItemGroup>
<None Include="$(RepoRoot)\icon.png" Pack="true" PackagePath="\" />
<None Include="$(RepoRoot)\README.md" Pack="true" PackagePath="\" />
</ItemGroup>

</Project>
30 changes: 1 addition & 29 deletions FSharp.Data.GraphQL.sln
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{E3330910-8B6C-4191-8046-D6D57FBC39B1}"
ProjectSection(SolutionItems) = preProject
.editorconfig = .editorconfig
Directory.Build.props = Directory.Build.props
Directory.Build.targets = Directory.Build.targets
global.json = global.json
LICENSE.txt = LICENSE.txt
Expand Down Expand Up @@ -261,30 +262,6 @@ Global
{F7858DA7-E067-486B-9E9C-697F0A56C620}.Release|x64.Build.0 = Release|Any CPU
{F7858DA7-E067-486B-9E9C-697F0A56C620}.Release|x86.ActiveCfg = Release|Any CPU
{F7858DA7-E067-486B-9E9C-697F0A56C620}.Release|x86.Build.0 = Release|Any CPU
{B837B3ED-83CE-446F-A4E5-44CB06AA6505}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B837B3ED-83CE-446F-A4E5-44CB06AA6505}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B837B3ED-83CE-446F-A4E5-44CB06AA6505}.Debug|x64.ActiveCfg = Debug|Any CPU
{B837B3ED-83CE-446F-A4E5-44CB06AA6505}.Debug|x64.Build.0 = Debug|Any CPU
{B837B3ED-83CE-446F-A4E5-44CB06AA6505}.Debug|x86.ActiveCfg = Debug|Any CPU
{B837B3ED-83CE-446F-A4E5-44CB06AA6505}.Debug|x86.Build.0 = Debug|Any CPU
{B837B3ED-83CE-446F-A4E5-44CB06AA6505}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B837B3ED-83CE-446F-A4E5-44CB06AA6505}.Release|Any CPU.Build.0 = Release|Any CPU
{B837B3ED-83CE-446F-A4E5-44CB06AA6505}.Release|x64.ActiveCfg = Release|Any CPU
{B837B3ED-83CE-446F-A4E5-44CB06AA6505}.Release|x64.Build.0 = Release|Any CPU
{B837B3ED-83CE-446F-A4E5-44CB06AA6505}.Release|x86.ActiveCfg = Release|Any CPU
{B837B3ED-83CE-446F-A4E5-44CB06AA6505}.Release|x86.Build.0 = Release|Any CPU
{E011A3B2-3D96-48E3-AF5F-DA544FF5C5FE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E011A3B2-3D96-48E3-AF5F-DA544FF5C5FE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E011A3B2-3D96-48E3-AF5F-DA544FF5C5FE}.Debug|x64.ActiveCfg = Debug|Any CPU
{E011A3B2-3D96-48E3-AF5F-DA544FF5C5FE}.Debug|x64.Build.0 = Debug|Any CPU
{E011A3B2-3D96-48E3-AF5F-DA544FF5C5FE}.Debug|x86.ActiveCfg = Debug|Any CPU
{E011A3B2-3D96-48E3-AF5F-DA544FF5C5FE}.Debug|x86.Build.0 = Debug|Any CPU
{E011A3B2-3D96-48E3-AF5F-DA544FF5C5FE}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E011A3B2-3D96-48E3-AF5F-DA544FF5C5FE}.Release|Any CPU.Build.0 = Release|Any CPU
{E011A3B2-3D96-48E3-AF5F-DA544FF5C5FE}.Release|x64.ActiveCfg = Release|Any CPU
{E011A3B2-3D96-48E3-AF5F-DA544FF5C5FE}.Release|x64.Build.0 = Release|Any CPU
{E011A3B2-3D96-48E3-AF5F-DA544FF5C5FE}.Release|x86.ActiveCfg = Release|Any CPU
{E011A3B2-3D96-48E3-AF5F-DA544FF5C5FE}.Release|x86.Build.0 = Release|Any CPU
{54AAFE43-FA5F-485A-AD40-0240165FC633}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{54AAFE43-FA5F-485A-AD40-0240165FC633}.Debug|Any CPU.Build.0 = Debug|Any CPU
{54AAFE43-FA5F-485A-AD40-0240165FC633}.Debug|x64.ActiveCfg = Debug|Any CPU
Expand Down Expand Up @@ -330,11 +307,6 @@ Global
{A6A162DF-9FBB-4C2A-913F-FD5FED35A09B} = {ED8079DD-2B06-4030-9F0F-DC548F98E1C4}
{CAE5916B-1415-4982-B705-7318D77C029C} = {B0C25450-74BF-40C2-9E02-09AADBAE2C2F}
{3D948D55-3CD2-496D-A04C-3B4E7BB69140} = {B0C25450-74BF-40C2-9E02-09AADBAE2C2F}
{6768EA38-1335-4B8E-BC09-CCDED1F9AAF6} = {BEFD8748-2467-45F9-A4AD-B450B12D5F78}
{8FB23F61-77CB-42C7-8EEC-B22D7C4E4067} = {BEFD8748-2467-45F9-A4AD-B450B12D5F78}
{A6A162DF-9FBB-4C2A-913F-FD5FED35A09B} = {ED8079DD-2B06-4030-9F0F-DC548F98E1C4}
{CAE5916B-1415-4982-B705-7318D77C029C} = {B0C25450-74BF-40C2-9E02-09AADBAE2C2F}
{3D948D55-3CD2-496D-A04C-3B4E7BB69140} = {B0C25450-74BF-40C2-9E02-09AADBAE2C2F}
{A47968E2-CDD1-4BCF-9093-D0C5225A815B} = {3D948D55-3CD2-496D-A04C-3B4E7BB69140}
{9D5C46E8-0C07-4384-8E58-903F7C2C7171} = {A47968E2-CDD1-4BCF-9093-D0C5225A815B}
{600D4BE2-FCE0-4684-AC6F-2DC829B395BA} = {B0C25450-74BF-40C2-9E02-09AADBAE2C2F}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net6.0;net7.0</TargetFrameworks>
<TargetFrameworks>$(PackageTargetFrameworks)</TargetFrameworks>
<EnableDefaultCompileItems>false</EnableDefaultCompileItems>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<ProduceReferenceAssembly>true</ProduceReferenceAssembly>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net6.0;net7.0</TargetFrameworks>
<TargetFrameworks>$(PackageTargetFrameworks)</TargetFrameworks>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<ProduceReferenceAssembly>true</ProduceReferenceAssembly>
<Deterministic>true</Deterministic>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net6.0;net7.0</TargetFrameworks>
<TargetFrameworks>$(PackageTargetFrameworks)</TargetFrameworks>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<ProduceReferenceAssembly>true</ProduceReferenceAssembly>
<Deterministic>true</Deterministic>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netstandard2.0;net6.0;net7.0</TargetFrameworks>
<TargetFrameworks>netstandard2.0;$(PackageTargetFrameworks)</TargetFrameworks>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<ProduceReferenceAssembly>true</ProduceReferenceAssembly>
<Deterministic>true</Deterministic>
Expand Down

0 comments on commit eededeb

Please sign in to comment.