|
91 | 91 | DependsOnTargets="_CheckPigzAvailability" |
92 | 92 | Condition="'$(SkipArchivesBuild)' != 'true'"> |
93 | 93 | <PropertyGroup> |
94 | | - <_OutputPathRoot>$(IntermediateOutputPath)output/</_OutputPathRoot> |
| 94 | + <_OutputPathRoot>$([MSBuild]::NormalizePath($(IntermediateOutputPath), 'output'))</_OutputPathRoot> |
95 | 95 | <_ArchiveFileName>$(ArchiveName)-$(Version)</_ArchiveFileName> |
96 | 96 | <_ArchiveFileName Condition="'$(RuntimeIdentifier)' != ''">$(ArchiveName)-$(Version)-$(RuntimeIdentifier)</_ArchiveFileName> |
97 | | - <_DestinationFileName>$(PackageOutputPath)/$(_ArchiveFileName).$(ArchiveFormat)</_DestinationFileName> |
| 97 | + <_DestinationFileName>$([MSBuild]::NormalizePath($(PackageOutputPath), '$(_ArchiveFileName).$(ArchiveFormat)'))</_DestinationFileName> |
98 | 98 | </PropertyGroup> |
99 | 99 | <MSBuild Projects="$(MSBuildProjectFullPath)" |
100 | 100 | Targets="PublishToDisk" |
|
106 | 106 | DestinationFile="$(_DestinationFileName)" |
107 | 107 | Condition="'$(ArchiveFormat)' == 'zip'"/> |
108 | 108 | <!-- use parallel gzip implementation when available --> |
109 | | - <Exec Command="tar -C '$(_OutputPathRoot)' -cf - . | pigz > '$(_DestinationFileName)'" |
| 109 | + <Exec Command="tar -cf - . | pigz > '$(_DestinationFileName)'" |
110 | 110 | IgnoreExitCode="true" |
111 | 111 | IgnoreStandardErrorWarningFormat="true" |
| 112 | + WorkingDirectory="$(_OutputPathRoot)" |
112 | 113 | Condition="'$(ArchiveFormat)' == 'tar.gz' and '$(_PigzFoundExitCode)' == '0'"/> |
113 | 114 | <!-- otherwise, use built-in gzip feature (-z) --> |
114 | | - <Exec Command="tar -C '$(_OutputPathRoot)' -czf '$(_DestinationFileName)' ." |
| 115 | + <Exec Command="tar -czf '$(_DestinationFileName)' ." |
115 | 116 | IgnoreExitCode="true" |
116 | 117 | IgnoreStandardErrorWarningFormat="true" |
| 118 | + WorkingDirectory="$(_OutputPathRoot)" |
117 | 119 | Condition="'$(ArchiveFormat)' == 'tar.gz' and '$(_PigzFoundExitCode)' != '0'"/> |
118 | 120 |
|
119 | 121 | <Message Text="Successfully created archive -> '$(_DestinationFileName)' from '$(_OutputPathRoot)'" Importance="high" /> |
|
123 | 125 | DependsOnTargets="_CheckPigzAvailability" |
124 | 126 | Condition="'$(CreateSymbolsArchive)' == 'true' and '$(SkipArchivesBuild)' != 'true'"> |
125 | 127 | <PropertyGroup> |
126 | | - <_SymbolsOutputPathRoot>$(IntermediateOutputPath)symbols/</_SymbolsOutputPathRoot> |
| 128 | + <_SymbolsOutputPathRoot>$([MSBuild]::NormalizeDirectory($(IntermediateOutputPath), 'symbols'))</_SymbolsOutputPathRoot> |
127 | 129 | <_ArchiveFileName>$(SymbolsArchiveName)-$(Version)</_ArchiveFileName> |
128 | 130 | <_ArchiveFileName Condition="'$(RuntimeIdentifier)' != ''">$(SymbolsArchiveName)-$(RuntimeIdentifier)-$(Version)</_ArchiveFileName> |
129 | | - <_DestinationFileName>$(PackageOutputPath)/$(_ArchiveFileName).$(ArchiveFormat)</_DestinationFileName> |
| 131 | + <_DestinationFileName>$([MSBuild]::NormalizePath($(PackageOutputPath), '$(_ArchiveFileName).$(ArchiveFormat)'))</_DestinationFileName> |
130 | 132 | </PropertyGroup> |
131 | 133 | <MSBuild Projects="$(MSBuildProjectFullPath)" |
132 | 134 | Targets="PublishSymbolsToDisk" |
|
138 | 140 | DestinationFile="$(_DestinationFileName)" |
139 | 141 | Condition="'$(ArchiveFormat)' == 'zip'"/> |
140 | 142 | <!-- use parallel gzip implementation when available --> |
141 | | - <Exec Command="tar -C '$(_OutputPathRoot)' -cf - . | pigz > '$(_DestinationFileName)'" |
| 143 | + <Exec Command="tar -cf - . | pigz > '$(_DestinationFileName)'" |
142 | 144 | IgnoreExitCode="true" |
143 | 145 | IgnoreStandardErrorWarningFormat="true" |
| 146 | + WorkingDirectory="$(_SymbolsOutputPathRoot)" |
144 | 147 | Condition="'$(ArchiveFormat)' == 'tar.gz' and '$(_PigzFoundExitCode)' == '0'"/> |
145 | 148 | <!-- otherwise, use built-in gzip feature (-z) --> |
146 | | - <Exec Command="tar -C '$(_OutputPathRoot)' -czf '$(_DestinationFileName)' ." |
| 149 | + <Exec Command="tar -czf '$(_DestinationFileName)' ." |
147 | 150 | IgnoreExitCode="true" |
148 | 151 | IgnoreStandardErrorWarningFormat="true" |
| 152 | + WorkingDirectory="$(_SymbolsOutputPathRoot)" |
149 | 153 | Condition="'$(ArchiveFormat)' == 'tar.gz' and '$(_PigzFoundExitCode)' != '0'"/> |
150 | 154 |
|
151 | 155 | <Message Text="Successfully created archive -> '$(_DestinationFileName)' from '$(_SymbolsOutputPathRoot)'" Importance="high" /> |
|
0 commit comments