diff options
author | ArnoldZokas <arnold.zokas@coderoom.net> | 2010-11-30 21:32:07 +0000 |
---|---|---|
committer | ArnoldZokas <arnold.zokas@coderoom.net> | 2010-11-30 21:32:07 +0000 |
commit | 1999a990bed07dd6f3d222f017bafa534b04e1eb (patch) | |
tree | 5bd6b8d591f9594b0ead12fcc164d954d9b2d2f7 /build/Common.targets | |
parent | d58af394bdc01621aeb049635cbd101a83bb2108 (diff) | |
download | protobuf-1999a990bed07dd6f3d222f017bafa534b04e1eb.tar.gz protobuf-1999a990bed07dd6f3d222f017bafa534b04e1eb.tar.bz2 protobuf-1999a990bed07dd6f3d222f017bafa534b04e1eb.zip |
Implemented distribution package generation
Diffstat (limited to 'build/Common.targets')
-rw-r--r-- | build/Common.targets | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/build/Common.targets b/build/Common.targets index 1b87ee16..067bb28c 100644 --- a/build/Common.targets +++ b/build/Common.targets @@ -33,4 +33,22 @@ <Exec Command=""E:\dotnet-protobufs\lib\NUnit 2.2.8.0\nunit-console.exe" %(TestContainer.Identity) /xml:$(BuildOutputDirectory)\%(TestContainer.Filename).$(BuildConfiguration).xml" /> </Target> + <Target Name="_PreparePackageComponent"> + <Copy SourceFiles="@(DynamicPackageItem)" DestinationFolder="$(BuildOutputDirectory)\%(DynamicPackageItem.TargetDirectory)\%(DynamicPackageItem.RecursiveDir)" /> + </Target> + + <Target Name="_GeneratePackage"> + <ItemGroup><ExistingArchives Include="$(BuildOutputDirectory)\*.zip" /></ItemGroup> + <Delete Files="@(ExistingArchives)" /> + + <Copy SourceFiles="@(StaticPackageItem)" DestinationFolder="$(BuildOutputDirectory)\%(StaticPackageItem.TargetDirectory)\%(StaticPackageItem.RecursiveDir)" /> + <Exec Command=""E:\dotnet-protobufs\lib\7-Zip 9.20\7za.exe" a -tzip $(PackageName) * -r" WorkingDirectory="$(BuildOutputDirectory)" /> + + <ItemGroup><DirectoriesToDelete Include="$([System.IO.Directory]::GetDirectories('$(BuildOutputDirectory)'))" /></ItemGroup> + <ItemGroup><FilesToDelete Include="$(BuildOutputDirectory)\**\*.*" Exclude="$(BuildOutputDirectory)\$(PackageName)" /></ItemGroup> + + <Delete Files="@(FilesToDelete)" /> + <RemoveDir Directories="@(DirectoriesToDelete)" ContinueOnError="true" /> + </Target> + </Project>
\ No newline at end of file |