Commit 09ca331e authored by Jesse McGrew's avatar Jesse McGrew
Browse files

Fix ZIP file creation on Linux.

parent 488687db5005
......@@ -21,10 +21,18 @@
<Copy SourceFiles="@(ZipFiles)" DestinationFolder="$(ZipStageDir)\%(RecursiveDir)" />
<ZipDirectory SourceDirectory="$(ZipStageDir)"
<!--
The ZipDirectory task doesn't set file permissions. Linux's unzip command checks the OS the ZIP was
created on, so if we use ZipDirectory to build a ZIP on Linux, they'll be extracted with mode 000.
https://github.com/Microsoft/msbuild/issues/3924
-->
<ZipDirectory Condition=" '$(OS)' != 'Unix' "
SourceDirectory="$(ZipStageDir)"
DestinationFile="$(ZipOutputFile)"
Overwrite="true" />
<!--<Zip Files="@(ZipFiles)" ZipFileName="$(PackageDir)\zilf-$(PackageVersion).zip" WorkingDirectory="$(StageDir)" />-->
<Exec Condition=" '$(OS)' == 'Unix' "
WorkingDirectory="$(ZipStageDir)"
Command="chmod -R u=rwX,go=rX .; chmod -R a+x bin; zip -r $(ZipOutputFile) ." />
<RemoveDir Directories="$(ZipStageDir)" />
</Target>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment