-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
84 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
50 changes: 50 additions & 0 deletions
50
src/Buildvana.Sdk/Modules/ReleaseAssetList/Module.Core.targets
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
<Project> | ||
|
||
<Target Name="PrepareReleaseAssetList" | ||
AfterTargets="Pack" | ||
DependsOnTargets="$(WriteReleaseAssetListDependsOn)" | ||
Condition="$(GenerateReleaseAssetList)"> | ||
|
||
<PropertyGroup Condition="'$(ReleaseAssetDefaultDescription)' == ''"> | ||
<ReleaseAssetDefaultDescription>(no description given)</ReleaseAssetDefaultDescription> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<ReleaseAsset Update="%(ReleaseAsset.Identity)" | ||
Description="$([System.String]::Copy('%(ReleaseAsset.Description)').Trim())" /> | ||
<ReleaseAsset Update="%(ReleaseAsset.Identity)" | ||
Condition="'%(ReleaseAsset.Description)' == ''" | ||
Description="$(ReleaseAssetDefaultDescription)" /> | ||
</ItemGroup> | ||
|
||
</Target> | ||
|
||
<Target Name="WriteReleaseAssetList" | ||
AfterTargets="Pack" | ||
DependsOnTargets="$(WriteReleaseAssetListDependsOn);PrepareReleaseAssetList" | ||
Condition="$(GenerateReleaseAssetList)"> | ||
|
||
<ItemGroup> | ||
<BV_ReleaseAssetText Include="%(ReleaseAsset.FullPath)	%(Description)" /> | ||
</ItemGroup> | ||
|
||
<PropertyGroup> | ||
<ReleaseAssetListFileName Condition="'$(ReleaseAssetListFileName)' == ''">$(MSBuildProjectName).assets.txt</ReleaseAssetListFileName> | ||
<ReleaseAssetListPath Condition="'$(ReleaseAssetListPath)' == ''">$(ArtifactsDirectory)$(Configuration)\$(ReleaseAssetListFileName)</ReleaseAssetListPath> | ||
</PropertyGroup> | ||
|
||
<WriteLinesToFile Condition="@(ReleaseAsset->Count()) > 0" | ||
File="$(ReleaseAssetListPath)" | ||
Lines="@(BV_ReleaseAssetText)" | ||
Overwrite="true" /> | ||
|
||
<Delete Condition="@(ReleaseAsset->Count()) == 0" | ||
Files="$(ReleaseAssetListPath)" /> | ||
|
||
<ItemGroup> | ||
<BV_ReleaseAssetText Remove="@(BV_ReleaseAssetText)" /> | ||
</ItemGroup> | ||
|
||
</Target> | ||
|
||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<Project> | ||
|
||
<!-- The default for GenerateReleaseAssetList is true, except for libraries and test projects --> | ||
<PropertyGroup Condition="'$(GenerateReleaseAssetList)' == ''"> | ||
<GenerateReleaseAssetList>true</GenerateReleaseAssetList> | ||
<GenerateReleaseAssetList Condition="$(BV_IsLibraryProject) Or $(BV_IsTestProject)">false</GenerateReleaseAssetList> | ||
</PropertyGroup> | ||
|
||
<!-- Coalesce GenerateReleaseAssetList to a boolean value, defaulting to false --> | ||
<PropertyGroup Condition="'$(GenerateReleaseAssetList)' != 'true'"> | ||
<GenerateReleaseAssetList>false</GenerateReleaseAssetList> | ||
</PropertyGroup> | ||
|
||
<Import Project="Module.Core.targets" | ||
Condition="$(GenerateReleaseAssetList)" /> | ||
|
||
</Project> |