Skip to content

Commit 668d619

Browse files
committed
paket updates
1 parent 681393c commit 668d619

File tree

5 files changed

+274
-251
lines changed

5 files changed

+274
-251
lines changed

.paket/Paket.Restore.targets

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@
2323
<_PaketExeExtension>$([System.IO.Path]::GetExtension("$(PaketExePath)"))</_PaketExeExtension>
2424
<PaketCommand Condition=" '$(_PaketExeExtension)' == '.dll' ">dotnet "$(PaketExePath)"</PaketCommand>
2525

26+
<!-- no extension is a shell script -->
27+
<PaketCommand Condition=" '$(_PaketExeExtension)' == '' ">"$(PaketExePath)"</PaketCommand>
28+
2629
<PaketBootStrapperExePath Condition=" '$(PaketBootStrapperExePath)' == '' AND Exists('$(PaketRootPath)paket.bootstrapper.exe')">$(PaketRootPath)paket.bootstrapper.exe</PaketBootStrapperExePath>
2730
<PaketBootStrapperExePath Condition=" '$(PaketBootStrapperExePath)' == '' ">$(PaketToolsPath)paket.bootstrapper.exe</PaketBootStrapperExePath>
2831
<PaketBootStrapperCommand Condition=" '$(OS)' == 'Windows_NT'">"$(PaketBootStrapperExePath)"</PaketBootStrapperCommand>
@@ -40,21 +43,21 @@
4043
<!-- Step 1 Check if lockfile is properly restored -->
4144
<PropertyGroup>
4245
<PaketRestoreRequired>true</PaketRestoreRequired>
43-
<NoWarn>$(NoWarn);NU1603</NoWarn>
46+
<NoWarn>$(NoWarn);NU1603;NU1604;NU1605;NU1608</NoWarn>
4447
</PropertyGroup>
4548

4649
<!-- Because ReadAllText is slow on osx/linux, try to find shasum and awk -->
4750
<PropertyGroup>
48-
<PaketRestoreCachedHasher Condition="'$(OS)' != 'Windows_NT' And '$(PaketRestoreCachedHasher)' == '' And Exists('/usr/bin/shasum') And Exists('/usr/bin/awk')">/usr/bin/shasum $(PaketRestoreCacheFile) | /usr/bin/awk '{ print $1 }'</PaketRestoreCachedHasher>
49-
<PaketRestoreLockFileHasher Condition="'$(OS)' != 'Windows_NT' And '$(PaketRestoreLockFileHash)' == '' And Exists('/usr/bin/shasum') And Exists('/usr/bin/awk')">/usr/bin/shasum $(PaketLockFilePath) | /usr/bin/awk '{ print $1 }'</PaketRestoreLockFileHasher>
51+
<PaketRestoreCachedHasher Condition="'$(OS)' != 'Windows_NT' And '$(PaketRestoreCachedHasher)' == '' And Exists('/usr/bin/shasum') And Exists('/usr/bin/awk')">/usr/bin/shasum "$(PaketRestoreCacheFile)" | /usr/bin/awk '{ print $1 }'</PaketRestoreCachedHasher>
52+
<PaketRestoreLockFileHasher Condition="'$(OS)' != 'Windows_NT' And '$(PaketRestoreLockFileHash)' == '' And Exists('/usr/bin/shasum') And Exists('/usr/bin/awk')">/usr/bin/shasum "$(PaketLockFilePath)" | /usr/bin/awk '{ print $1 }'</PaketRestoreLockFileHasher>
5053
</PropertyGroup>
5154

5255
<!-- If shasum and awk exist get the hashes -->
53-
<Exec Condition=" '$(PaketRestoreCachedHasher)' != '' " Command="$(PaketRestoreCachedHasher)" ConsoleToMSBuild='true'>
54-
<Output TaskParameter="ConsoleOutput" PropertyName="PaketRestoreCachedHash" />
56+
<Exec StandardOutputImportance="Low" Condition=" '$(PaketRestoreCachedHasher)' != '' " Command="$(PaketRestoreCachedHasher)" ConsoleToMSBuild='true'>
57+
<Output TaskParameter="ConsoleOutput" PropertyName="PaketRestoreCachedHash" />
5558
</Exec>
56-
<Exec Condition=" '$(PaketRestoreLockFileHasher)' != '' " Command="$(PaketRestoreLockFileHasher)" ConsoleToMSBuild='true'>
57-
<Output TaskParameter="ConsoleOutput" PropertyName="PaketRestoreLockFileHash" />
59+
<Exec StandardOutputImportance="Low" Condition=" '$(PaketRestoreLockFileHasher)' != '' " Command="$(PaketRestoreLockFileHasher)" ConsoleToMSBuild='true'>
60+
<Output TaskParameter="ConsoleOutput" PropertyName="PaketRestoreLockFileHash" />
5861
</Exec>
5962

6063
<PropertyGroup Condition="Exists('$(PaketRestoreCacheFile)') ">
@@ -66,9 +69,11 @@
6669
<PaketRestoreRequired Condition=" '$(PaketRestoreLockFileHash)' == '' ">true</PaketRestoreRequired>
6770
</PropertyGroup>
6871

72+
6973
<!-- Do a global restore if required -->
7074
<Exec Command='$(PaketBootStrapperCommand)' Condition="Exists('$(PaketBootStrapperExePath)') AND !(Exists('$(PaketExePath)'))" ContinueOnError="false" />
71-
<Exec Command='$(PaketCommand) restore' Condition=" '$(PaketRestoreRequired)' == 'true' " ContinueOnError="false" />
75+
<Exec Command='$(PaketCommand) restore --target-framework "$(TargetFrameworks)"' Condition=" '$(PaketRestoreRequired)' == 'true' AND '$(TargetFramework)' == '' " ContinueOnError="false" />
76+
<Exec Command='$(PaketCommand) restore --target-framework "$(TargetFramework)"' Condition=" '$(PaketRestoreRequired)' == 'true' AND '$(TargetFramework)' != '' " ContinueOnError="false" />
7277

7378
<!-- Step 2 Detect project specific changes -->
7479
<PropertyGroup>
@@ -124,6 +129,7 @@
124129
<PackageReference Include="%(PaketReferencesFileLinesInfo.PackageName)">
125130
<Version>%(PaketReferencesFileLinesInfo.PackageVersion)</Version>
126131
<PrivateAssets Condition="%(PaketReferencesFileLinesInfo.AllPrivateAssets) == 'true'">All</PrivateAssets>
132+
<ExcludeAssets Condition="%(PaketReferencesFileLinesInfo.AllPrivateAssets) == 'exclude'">runtime</ExcludeAssets>
127133
</PackageReference>
128134
</ItemGroup>
129135

@@ -145,9 +151,10 @@
145151
</DotNetCliToolReference>
146152
</ItemGroup>
147153

154+
<!-- Disabled for now until we know what to do with runtime deps - https://github.com/fsprojects/Paket/issues/2964
148155
<PropertyGroup>
149156
<RestoreConfigFile>$(MSBuildProjectDirectory)/obj/$(MSBuildProjectFile).NuGet.Config</RestoreConfigFile>
150-
</PropertyGroup>
157+
</PropertyGroup> -->
151158

152159
</Target>
153160

@@ -179,8 +186,8 @@
179186

180187
<ConvertToAbsolutePath Condition="@(_NuspecFiles) != ''" Paths="@(_NuspecFiles)">
181188
<Output TaskParameter="AbsolutePaths" PropertyName="NuspecFileAbsolutePath" />
182-
</ConvertToAbsolutePath>
183-
189+
</ConvertToAbsolutePath>
190+
184191

185192
<!-- Call Pack -->
186193
<PackTask Condition="$(UseNewPack)"

0 commit comments

Comments
 (0)