Skip to content

Commit

Permalink
Merge pull request #130 from SunburstApps/macos-support
Browse files Browse the repository at this point in the history
Fixes to allow restore and build on macOS
  • Loading branch information
Oren Novotny authored Nov 17, 2018
2 parents 4900b4f + 962bc91 commit 25833a8
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Tools/MSBuild.DevLocal.targets
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
<!-- Tools to make local dev easier -->
<Target Name="_EnsureTempPackageSource" BeforeTargets="Restore;_LocalPublish">
<PropertyGroup>
<!-- TEMP is not defined by default on macOS. TMPDIR, however, is. -->
<TEMP Condition="'$(TEMP)' == '' and '$(TMPDIR)' != ''">$(TMPDIR)</TEMP>
<TempPackagePath Condition="'$(TempPackagePath)' == ''">$(TEMP)\Packages</TempPackagePath>
</PropertyGroup>
<MakeDir Directories="$(TempPackagePath)" Condition="!Exists('$(TempPackagePath)')" />
Expand All @@ -14,7 +16,8 @@
</ItemGroup>

<Delete Files="@(ToDelete)"/>
<Exec Command='rd "$(NuGetPackageRoot)$(PackageId.ToLowerInvariant())" /q /s' Condition="Exists('$(NuGetPackageRoot)$(PackageId.ToLowerInvariant())')"/>
<Exec Command='rd "$(NuGetPackageRoot)$(PackageId.ToLowerInvariant())" /q /s' Condition="Exists('$(NuGetPackageRoot)$(PackageId.ToLowerInvariant())') and $([MSBuild]::IsOSPlatform(Windows))"/>
<Exec Command='rm -rf "$(NuGetPackageRoot)$(PackageId.ToLowerInvariant())"' Condition="Exists('$(NuGetPackageRoot)$(PackageId.ToLowerInvariant())') and !$([MSBuild]::IsOSPlatform(Windows))"/>
</Target>

<Target Name="_SetFixedVersion"
Expand All @@ -32,4 +35,4 @@
<Copy SourceFiles="$(PackageOutputPath)$(PackageId).$(PackageVersion).nupkg" DestinationFolder="$(TempPackagePath)"/>
</Target>

</Project>
</Project>

0 comments on commit 25833a8

Please sign in to comment.