Skip to content

Commit 3178668

Browse files
authored
Update helper scripts (#221)
* Remove extension from license file https://help.github.com/en/articles/adding-a-license-to-a-repository * Update Paket and removed some dependencies not needed at solution level as they're handled by helper scripts. * Update main IF# helper scripts to XPlot 2.0 Switch to using Paket load scripts where possible Partial fixes for GoogleCharts in the experimental netcore version. Not quite working.
1 parent 634b95e commit 3178668

14 files changed

+156
-171
lines changed

.paket/Paket.Restore.targets

Lines changed: 69 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,8 @@
6565

6666
<!-- Disable Paket restore under NCrunch build -->
6767
<PaketRestoreDisabled Condition="'$(NCrunch)' == '1'">True</PaketRestoreDisabled>
68+
69+
<PaketIntermediateOutputPath Condition=" '$(PaketIntermediateOutputPath)' == '' ">$(BaseIntermediateOutputPath.TrimEnd('\').TrimEnd('\/'))</PaketIntermediateOutputPath>
6870
</PropertyGroup>
6971

7072
<Target Name="PaketBootstrapping" Condition="Exists('$(PaketToolsPath)paket.bootstrapper.proj')">
@@ -105,8 +107,8 @@
105107
<PaketRestoreRequired Condition=" '$(PaketRestoreLockFileHash)' == '' ">true</PaketRestoreRequired>
106108
</PropertyGroup>
107109

108-
<!--
109-
This value should match the version in the props generated by paket
110+
<!--
111+
This value should match the version in the props generated by paket
110112
If they differ, this means we need to do a restore in order to ensure correct dependencies
111113
-->
112114
<PropertyGroup Condition="'$(PaketPropsVersion)' != '5.185.3' ">
@@ -115,18 +117,18 @@
115117

116118
<!-- Do a global restore if required -->
117119
<Exec Command='$(PaketBootStrapperCommand)' Condition=" '$(PaketBootstrapperStyle)' == 'classic' AND Exists('$(PaketBootStrapperExePath)') AND !(Exists('$(PaketExePath)'))" ContinueOnError="false" />
118-
<Exec Command='$(PaketCommand) restore' Condition=" '$(PaketRestoreRequired)' == 'true' " ContinueOnError="false" />
119-
120+
<Exec Command='$(PaketCommand) restore' Condition=" '$(PaketRestoreRequired)' == 'true' AND '$(PaketDisableGlobalRestore)' != 'true' " ContinueOnError="false" />
121+
120122
<!-- Step 2 Detect project specific changes -->
121123
<ItemGroup>
122124
<MyTargetFrameworks Condition="'$(TargetFramework)' != '' " Include="$(TargetFramework)"></MyTargetFrameworks>
123125
<!-- Don't include all frameworks when msbuild explicitly asks for a single one -->
124126
<MyTargetFrameworks Condition="'$(TargetFrameworks)' != '' AND '$(TargetFramework)' == '' " Include="$(TargetFrameworks)"></MyTargetFrameworks>
125-
<PaketResolvedFilePaths Include="@(MyTargetFrameworks -> '$(MSBuildProjectDirectory)\obj\$(MSBuildProjectFile).%(Identity).paket.resolved')"></PaketResolvedFilePaths>
127+
<PaketResolvedFilePaths Include="@(MyTargetFrameworks -> '$(PaketIntermediateOutputPath)\$(MSBuildProjectFile).%(Identity).paket.resolved')"></PaketResolvedFilePaths>
126128
</ItemGroup>
127129
<Message Importance="low" Text="MyTargetFrameworks=@(MyTargetFrameworks) PaketResolvedFilePaths=@(PaketResolvedFilePaths)" />
128130
<PropertyGroup>
129-
<PaketReferencesCachedFilePath>$(MSBuildProjectDirectory)\obj\$(MSBuildProjectFile).paket.references.cached</PaketReferencesCachedFilePath>
131+
<PaketReferencesCachedFilePath>$(PaketIntermediateOutputPath)\$(MSBuildProjectFile).paket.references.cached</PaketReferencesCachedFilePath>
130132
<!-- MyProject.fsproj.paket.references has the highest precedence -->
131133
<PaketOriginalReferencesFilePath>$(MSBuildProjectFullPath).paket.references</PaketOriginalReferencesFilePath>
132134
<!-- MyProject.paket.references -->
@@ -161,8 +163,8 @@
161163

162164
<!-- Step 3 Restore project specific stuff if required -->
163165
<Message Condition=" '$(PaketRestoreRequired)' == 'true' " Importance="low" Text="Detected a change ('$(PaketRestoreRequiredReason)') in the project file '$(MSBuildProjectFullPath)', calling paket restore" />
164-
<Exec Command='$(PaketCommand) restore --project "$(MSBuildProjectFullPath)" --target-framework "$(TargetFrameworks)"' Condition=" '$(PaketRestoreRequired)' == 'true' AND '$(TargetFramework)' == '' " ContinueOnError="false" />
165-
<Exec Command='$(PaketCommand) restore --project "$(MSBuildProjectFullPath)" --target-framework "$(TargetFramework)"' Condition=" '$(PaketRestoreRequired)' == 'true' AND '$(TargetFramework)' != '' " ContinueOnError="false" />
166+
<Exec Command='$(PaketCommand) restore --project "$(MSBuildProjectFullPath)" --output-path "$(PaketIntermediateOutputPath)" --target-framework "$(TargetFrameworks)"' Condition=" '$(PaketRestoreRequired)' == 'true' AND '$(TargetFramework)' == '' " ContinueOnError="false" />
167+
<Exec Command='$(PaketCommand) restore --project "$(MSBuildProjectFullPath)" --output-path "$(PaketIntermediateOutputPath)" --target-framework "$(TargetFramework)"' Condition=" '$(PaketRestoreRequired)' == 'true' AND '$(TargetFramework)' != '' " ContinueOnError="false" />
166168

167169
<!-- This shouldn't actually happen, but just to be sure. -->
168170
<PropertyGroup>
@@ -195,7 +197,7 @@
195197
</ItemGroup>
196198

197199
<PropertyGroup>
198-
<PaketCliToolFilePath>$(MSBuildProjectDirectory)/obj/$(MSBuildProjectFile).paket.clitools</PaketCliToolFilePath>
200+
<PaketCliToolFilePath>$(PaketIntermediateOutputPath)/$(MSBuildProjectFile).paket.clitools</PaketCliToolFilePath>
199201
</PropertyGroup>
200202

201203
<ReadLinesFromFile File="$(PaketCliToolFilePath)" >
@@ -214,37 +216,39 @@
214216

215217
<!-- Disabled for now until we know what to do with runtime deps - https://github.com/fsprojects/Paket/issues/2964
216218
<PropertyGroup>
217-
<RestoreConfigFile>$(MSBuildProjectDirectory)/obj/$(MSBuildProjectFile).NuGet.Config</RestoreConfigFile>
219+
<RestoreConfigFile>$(PaketIntermediateOutputPath)/$(MSBuildProjectFile).NuGet.Config</RestoreConfigFile>
218220
</PropertyGroup> -->
219221

220222
</Target>
221223

222-
<Target Name="PaketDisableDirectPack" AfterTargets="_IntermediatePack" BeforeTargets="GenerateNuspec" Condition="('$(IsPackable)' == '' Or '$(IsPackable)' == 'true') And Exists('$(MSBuildProjectDirectory)/obj/$(MSBuildProjectFile).references')" >
224+
<Target Name="PaketDisableDirectPack" AfterTargets="_IntermediatePack" BeforeTargets="GenerateNuspec" Condition="('$(IsPackable)' == '' Or '$(IsPackable)' == 'true') And Exists('$(PaketIntermediateOutputPath)/$(MSBuildProjectFile).references')" >
223225
<PropertyGroup>
224226
<ContinuePackingAfterGeneratingNuspec>false</ContinuePackingAfterGeneratingNuspec>
225227
<DetectedMSBuildVersion>$(MSBuildVersion)</DetectedMSBuildVersion>
226228
<DetectedMSBuildVersion Condition="$(MSBuildVersion) == ''">15.8.0</DetectedMSBuildVersion>
227229
</PropertyGroup>
228230
</Target>
229231

230-
<Target Name="PaketOverrideNuspec" AfterTargets="GenerateNuspec" Condition="('$(IsPackable)' == '' Or '$(IsPackable)' == 'true') And Exists('$(MSBuildProjectDirectory)/obj/$(MSBuildProjectFile).references')" >
232+
<Target Name="PaketOverrideNuspec" AfterTargets="GenerateNuspec" Condition="('$(IsPackable)' == '' Or '$(IsPackable)' == 'true') And Exists('$(PaketIntermediateOutputPath)/$(MSBuildProjectFile).references')" >
231233
<ItemGroup>
232-
<_NuspecFilesNewLocation Include="$(BaseIntermediateOutputPath)$(Configuration)\*.nuspec"/>
234+
<_NuspecFilesNewLocation Include="$(PaketIntermediateOutputPath)\$(Configuration)\*.nuspec"/>
233235
<MSBuildMajorVersion Include="$(DetectedMSBuildVersion.Replace(`-`, `.`).Split(`.`)[0])" />
234236
<MSBuildMinorVersion Include="$(DetectedMSBuildVersion.Replace(`-`, `.`).Split(`.`)[1])" />
235237
</ItemGroup>
236238

237239
<PropertyGroup>
238240
<PaketProjectFile>$(MSBuildProjectDirectory)/$(MSBuildProjectFile)</PaketProjectFile>
239241
<ContinuePackingAfterGeneratingNuspec>true</ContinuePackingAfterGeneratingNuspec>
242+
<UseMSBuild16_0_Pack>false</UseMSBuild16_0_Pack>
243+
<UseMSBuild16_0_Pack Condition=" '@(MSBuildMajorVersion)' >= '16' ">true</UseMSBuild16_0_Pack>
240244
<UseMSBuild15_9_Pack>false</UseMSBuild15_9_Pack>
241-
<UseMSBuild15_9_Pack Condition=" '@(MSBuildMajorVersion)' > '15' OR ('@(MSBuildMajorVersion)' == '15' AND '@(MSBuildMinorVersion)' > '8') ">true</UseMSBuild15_9_Pack>
245+
<UseMSBuild15_9_Pack Condition=" '@(MSBuildMajorVersion)' == '15' AND '@(MSBuildMinorVersion)' > '8' ">true</UseMSBuild15_9_Pack>
242246
<UseMSBuild15_8_Pack>false</UseMSBuild15_8_Pack>
243-
<UseMSBuild15_8_Pack Condition=" '$(NuGetToolVersion)' != '4.0.0' AND (! $(UseMSBuild15_9_Pack)) ">true</UseMSBuild15_8_Pack>
247+
<UseMSBuild15_8_Pack Condition=" '$(NuGetToolVersion)' != '4.0.0' AND (! $(UseMSBuild15_9_Pack)) AND (! $(UseMSBuild16_0_Pack)) ">true</UseMSBuild15_8_Pack>
244248
<UseNuGet4_Pack>false</UseNuGet4_Pack>
245-
<UseNuGet4_Pack Condition=" (! $(UseMSBuild15_8_Pack)) AND (! $(UseMSBuild15_9_Pack)) ">true</UseNuGet4_Pack>
246-
<AdjustedNuspecOutputPath>$(BaseIntermediateOutputPath)$(Configuration)</AdjustedNuspecOutputPath>
247-
<AdjustedNuspecOutputPath Condition="@(_NuspecFilesNewLocation) == ''">$(BaseIntermediateOutputPath)</AdjustedNuspecOutputPath>
249+
<UseNuGet4_Pack Condition=" (! $(UseMSBuild15_8_Pack)) AND (! $(UseMSBuild15_9_Pack)) AND (! $(UseMSBuild16_0_Pack)) ">true</UseNuGet4_Pack>
250+
<AdjustedNuspecOutputPath>$(PaketIntermediateOutputPath)\$(Configuration)</AdjustedNuspecOutputPath>
251+
<AdjustedNuspecOutputPath Condition="@(_NuspecFilesNewLocation) == ''">$(PaketIntermediateOutputPath)</AdjustedNuspecOutputPath>
248252
</PropertyGroup>
249253

250254
<ItemGroup>
@@ -258,6 +262,53 @@
258262
</ConvertToAbsolutePath>
259263

260264
<!-- Call Pack -->
265+
<PackTask Condition="$(UseMSBuild16_0_Pack)"
266+
PackItem="$(PackProjectInputFile)"
267+
PackageFiles="@(_PackageFiles)"
268+
PackageFilesToExclude="@(_PackageFilesToExclude)"
269+
PackageVersion="$(PackageVersion)"
270+
PackageId="$(PackageId)"
271+
Title="$(Title)"
272+
Authors="$(Authors)"
273+
Description="$(Description)"
274+
Copyright="$(Copyright)"
275+
RequireLicenseAcceptance="$(PackageRequireLicenseAcceptance)"
276+
LicenseUrl="$(PackageLicenseUrl)"
277+
ProjectUrl="$(PackageProjectUrl)"
278+
IconUrl="$(PackageIconUrl)"
279+
ReleaseNotes="$(PackageReleaseNotes)"
280+
Tags="$(PackageTags)"
281+
DevelopmentDependency="$(DevelopmentDependency)"
282+
BuildOutputInPackage="@(_BuildOutputInPackage)"
283+
TargetPathsToSymbols="@(_TargetPathsToSymbols)"
284+
SymbolPackageFormat="symbols.nupkg"
285+
TargetFrameworks="@(_TargetFrameworks)"
286+
AssemblyName="$(AssemblyName)"
287+
PackageOutputPath="$(PackageOutputAbsolutePath)"
288+
IncludeSymbols="$(IncludeSymbols)"
289+
IncludeSource="$(IncludeSource)"
290+
PackageTypes="$(PackageType)"
291+
IsTool="$(IsTool)"
292+
RepositoryUrl="$(RepositoryUrl)"
293+
RepositoryType="$(RepositoryType)"
294+
SourceFiles="@(_SourceFiles->Distinct())"
295+
NoPackageAnalysis="$(NoPackageAnalysis)"
296+
MinClientVersion="$(MinClientVersion)"
297+
Serviceable="$(Serviceable)"
298+
FrameworkAssemblyReferences="@(_FrameworkAssemblyReferences)"
299+
ContinuePackingAfterGeneratingNuspec="$(ContinuePackingAfterGeneratingNuspec)"
300+
NuspecOutputPath="$(AdjustedNuspecOutputPath)"
301+
IncludeBuildOutput="$(IncludeBuildOutput)"
302+
BuildOutputFolders="$(BuildOutputTargetFolder)"
303+
ContentTargetFolders="$(ContentTargetFolders)"
304+
RestoreOutputPath="$(RestoreOutputAbsolutePath)"
305+
NuspecFile="$(NuspecFileAbsolutePath)"
306+
NuspecBasePath="$(NuspecBasePath)"
307+
NuspecProperties="$(NuspecProperties)"
308+
PackageLicenseFile="$(PackageLicenseFile)"
309+
PackageLicenseExpression="$(PackageLicenseExpression)"
310+
PackageLicenseExpressionVersion="$(PackageLicenseExpressionVersion)" />
311+
261312
<PackTask Condition="$(UseMSBuild15_9_Pack)"
262313
PackItem="$(PackProjectInputFile)"
263314
PackageFiles="@(_PackageFiles)"

IfSharpNetCore.sln

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
11

22
Microsoft Visual Studio Solution File, Format Version 12.00
3-
# Visual Studio 15
4-
VisualStudioVersion = 15.0.28307.421
3+
# Visual Studio Version 16
4+
VisualStudioVersion = 16.0.28803.352
55
MinimumVisualStudioVersion = 10.0.40219.1
6-
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "IfSharp.Kernel", "src\IfSharp.Kernel\IfSharp.Kernel.fsproj", "{25FE52CD-BCE3-471D-A629-9DC9F0410B6C}"
6+
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "IfSharp.Kernel", "src\IfSharp.Kernel\IfSharp.Kernel.fsproj", "{25FE52CD-BCE3-471D-A629-9DC9F0410B6C}"
77
EndProject
8-
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "IfSharpNetCore", "src\IfSharpNetCore\IfSharpNetCore.fsproj", "{4D3A95BC-3636-4474-B176-9ECCEC4FB3D8}"
8+
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "IfSharpNetCore", "src\IfSharpNetCore\IfSharpNetCore.fsproj", "{4D3A95BC-3636-4474-B176-9ECCEC4FB3D8}"
99
EndProject
1010
Global
1111
GlobalSection(SolutionConfigurationPlatforms) = preSolution
1212
Debug|x64 = Debug|x64
1313
Release|x64 = Release|x64
1414
EndGlobalSection
1515
GlobalSection(ProjectConfigurationPlatforms) = postSolution
16-
{25FE52CD-BCE3-471D-A629-9DC9F0410B6C}.Debug|x64.ActiveCfg = Debug|Any CPU
17-
{25FE52CD-BCE3-471D-A629-9DC9F0410B6C}.Debug|x64.Build.0 = Debug|Any CPU
18-
{25FE52CD-BCE3-471D-A629-9DC9F0410B6C}.Release|x64.ActiveCfg = Release|Any CPU
19-
{25FE52CD-BCE3-471D-A629-9DC9F0410B6C}.Release|x64.Build.0 = Release|Any CPU
20-
{4D3A95BC-3636-4474-B176-9ECCEC4FB3D8}.Debug|x64.ActiveCfg = Debug|Any CPU
21-
{4D3A95BC-3636-4474-B176-9ECCEC4FB3D8}.Debug|x64.Build.0 = Debug|Any CPU
22-
{4D3A95BC-3636-4474-B176-9ECCEC4FB3D8}.Release|x64.ActiveCfg = Release|Any CPU
23-
{4D3A95BC-3636-4474-B176-9ECCEC4FB3D8}.Release|x64.Build.0 = Release|Any CPU
16+
{25FE52CD-BCE3-471D-A629-9DC9F0410B6C}.Debug|x64.ActiveCfg = Debug|x64
17+
{25FE52CD-BCE3-471D-A629-9DC9F0410B6C}.Debug|x64.Build.0 = Debug|x64
18+
{25FE52CD-BCE3-471D-A629-9DC9F0410B6C}.Release|x64.ActiveCfg = Release|x64
19+
{25FE52CD-BCE3-471D-A629-9DC9F0410B6C}.Release|x64.Build.0 = Release|x64
20+
{4D3A95BC-3636-4474-B176-9ECCEC4FB3D8}.Debug|x64.ActiveCfg = Debug|x64
21+
{4D3A95BC-3636-4474-B176-9ECCEC4FB3D8}.Debug|x64.Build.0 = Debug|x64
22+
{4D3A95BC-3636-4474-B176-9ECCEC4FB3D8}.Release|x64.ActiveCfg = Release|x64
23+
{4D3A95BC-3636-4474-B176-9ECCEC4FB3D8}.Release|x64.Build.0 = Release|x64
2424
EndGlobalSection
2525
GlobalSection(SolutionProperties) = preSolution
2626
HideSolutionNode = FALSE

LICENSE.txt renamed to LICENSE

File renamed without changes.

paket.dependencies

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
1-
version 5.198.0
1+
version 5.207.0
22

33
framework: net472
44
source https://api.nuget.org/v3/index.json
55

6-
nuget FSharp.Compiler.Service ~> 27.0.1
7-
nuget FSharp.Compiler.Tools ~> 10.2.1
6+
nuget FSharp.Compiler.Service ~> 28.0.0
7+
nuget FSharp.Compiler.Tools ~> 10.2.3
88
nuget FSharp.Core = 4.6.2
99
nuget AsyncIO >= 0.1.69
10-
nuget Itis.Angara.Base ~> 0.3.3
10+
#nuget Itis.Angara.Base ~> 0.3.3
1111
nuget NetMQ ~> 4.0.0.207-pre
1212
nuget Newtonsoft.Json ~> 12.0.1
1313
nuget FAKE >= 5.8.4
14-
nuget Paket.Core ~> 5.198.0
14+
nuget Paket.Core ~> 5.207.0
1515
nuget Trinet.Core.IO.Ntfs
16-
nuget XPlot.Plotly 1.5.0
16+
#nuget XPlot.Plotly 1.5.0
1717

1818
#nuget System.Runtime
1919

@@ -25,16 +25,16 @@ group NETCORE
2525
framework: netstandard2.0, netcoreapp2.2
2626
source https://api.nuget.org/v3/index.json
2727

28-
nuget FSharp.Compiler.Service ~> 27.0.1
29-
nuget FSharp.Compiler.Tools ~> 10.2.1
28+
nuget FSharp.Compiler.Service ~> 28.0.0
29+
nuget FSharp.Compiler.Tools ~> 10.2.3
3030
nuget FSharp.Core = 4.6.2
3131
nuget AsyncIO >= 0.1.69
32-
nuget Itis.Angara.Base ~> 0.3.3
32+
#nuget Itis.Angara.Base ~> 0.3.3
3333
nuget NetMQ ~> 4.0.0.207-pre
3434
nuget Newtonsoft.Json ~> 12.0.1
3535
nuget FAKE >= 5.8.4
36-
nuget XPlot.Plotly 1.5.0
37-
nuget Paket.Core ~> 5.198.0
36+
#nuget XPlot.Plotly 1.5.0
37+
nuget Paket.Core ~> 5.207.0
3838
nuget Trinet.Core.IO.Ntfs
3939

4040
#nuget System.Runtime

0 commit comments

Comments
 (0)