summaryrefslogtreecommitdiff
path: root/modules/mono/Directory.Build.targets
blob: 98410b93aed92ee70aaf03d96f460d7375e2c7fc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<Project>
  <PropertyGroup>
    <_HasNuGetPackage Condition=" '$(_HasNuGetPackage)' == '' And '$(PackageId)' != '' And '$(GeneratePackageOnBuild.ToLower())' == 'true' ">true</_HasNuGetPackage>
    <_HasNuGetPackage Condition=" '$(_HasNuGetPackage)' == '' ">false</_HasNuGetPackage>
  </PropertyGroup>
  <Target Name="CopyNupkgToSConsOutputDir" AfterTargets="Pack"
    Condition=" '$(_HasNuGetPackage)' == 'true' ">
    <PropertyGroup>
      <GodotSourceRootPath>$(MSBuildThisFileDirectory)\..\..\</GodotSourceRootPath>
      <GodotOutputDataDir>$(GodotSourceRootPath)\bin\GodotSharp\</GodotOutputDataDir>
    </PropertyGroup>
    <Copy SourceFiles="$(PackageOutputPath)$(PackageId).$(PackageVersion).nupkg" DestinationFolder="$(GodotOutputDataDir)Tools\nupkgs\" />
  </Target>
  <Target Name="PushNuGetPackagesToLocalSource" BeforeTargets="Pack"
    Condition=" '$(_HasNuGetPackage)' == 'true' And '$(PushNuGetToLocalSource)' != '' ">
    <Copy SourceFiles="$(PackageOutputPath)$(PackageId).$(PackageVersion).nupkg" DestinationFolder="$(PushNuGetToLocalSource)\" />
  </Target>
  <Target Name="ClearNuGetLocalPackageCache" BeforeTargets="Pack"
    Condition=" '$(_HasNuGetPackage)' == 'true' And '$(ClearNuGetLocalCache.ToLower())' == 'true' ">
    <RemoveDir Directories="$(NugetPackageRoot)/$(PackageId.ToLower())/$(PackageVersion)"/>
  </Target>
</Project>