|
80 | 80 | <Target Name="_CreateArchive" |
81 | 81 | Condition="'$(SkipArchivesBuild)' != 'true'"> |
82 | 82 | <PropertyGroup> |
83 | | - <_OutputPathRoot>$(IntermediateOutputPath)output/</_OutputPathRoot> |
| 83 | + <_OutputPathRoot>$([MSBuild]::NormalizeDirectory($(IntermediateOutputPath), 'output'))</_OutputPathRoot> |
84 | 84 | <_ArchiveFileName>$(ArchiveName)-$(Version)</_ArchiveFileName> |
85 | 85 | <_ArchiveFileName Condition="'$(RuntimeIdentifier)' != ''">$(ArchiveName)-$(Version)-$(RuntimeIdentifier)</_ArchiveFileName> |
86 | | - <_DestinationFileName>$(PackageOutputPath)/$(_ArchiveFileName).$(ArchiveFormat)</_DestinationFileName> |
| 86 | + <_DestinationFileName>$([MSBuild]::NormalizePath($(PackageOutputPath), '$(_ArchiveFileName).$(ArchiveFormat)'))</_DestinationFileName> |
87 | 87 | </PropertyGroup> |
| 88 | + <MakeDir Directories="$(_OutputPathRoot)" /> |
88 | 89 | <MSBuild Projects="$(MSBuildProjectFullPath)" |
89 | 90 | Targets="PublishToDisk" |
90 | 91 | Properties="OutputPath=$(_OutputPathRoot)" /> |
|
94 | 95 | Overwrite="true" |
95 | 96 | DestinationFile="$(_DestinationFileName)" |
96 | 97 | Condition="'$(ArchiveFormat)' == 'zip'"/> |
97 | | - <Exec Command="tar -C '$(_OutputPathRoot)' -czf $(_DestinationFileName) ." |
| 98 | + <Exec Command="tar -czf $(_DestinationFileName) ." |
98 | 99 | IgnoreExitCode="true" |
99 | 100 | IgnoreStandardErrorWarningFormat="true" |
| 101 | + WorkingDirectory="$(_OutputPathRoot)" |
100 | 102 | Condition="'$(ArchiveFormat)' == 'tar.gz'"/> |
101 | 103 |
|
102 | 104 | <Message Text="$(_OutputPathRoot) -> $(_DestinationFileName)" Importance="high" /> |
|
105 | 107 | <Target Name="_CreateSymbolsArchive" |
106 | 108 | Condition="'$(CreateSymbolsArchive)' == 'true' and '$(SkipArchivesBuild)' != 'true'"> |
107 | 109 | <PropertyGroup> |
108 | | - <_SymbolsOutputPathRoot>$(IntermediateOutputPath)symbols/</_SymbolsOutputPathRoot> |
| 110 | + <_SymbolsOutputPathRoot>$([MSBuild]::NormalizeDirectory($(IntermediateOutputPath), 'symbols'))</_SymbolsOutputPathRoot> |
109 | 111 | <_ArchiveFileName>$(SymbolsArchiveName)-$(Version)</_ArchiveFileName> |
110 | 112 | <_ArchiveFileName Condition="'$(RuntimeIdentifier)' != ''">$(SymbolsArchiveName)-$(RuntimeIdentifier)-$(Version)</_ArchiveFileName> |
111 | | - <_DestinationFileName>$(PackageOutputPath)/$(_ArchiveFileName).$(ArchiveFormat)</_DestinationFileName> |
| 113 | + <_DestinationFileName>$([MSBuild]::NormalizePath($(PackageOutputPath), '$(_ArchiveFileName).$(ArchiveFormat)'))</_DestinationFileName> |
112 | 114 | </PropertyGroup> |
| 115 | + <MakeDir Directories="$(_SymbolsOutputPathRoot)" /> |
113 | 116 | <MSBuild Projects="$(MSBuildProjectFullPath)" |
114 | 117 | Targets="PublishSymbolsToDisk" |
115 | 118 | Properties="SymbolsOutputPath=$(_SymbolsOutputPathRoot)" /> |
|
119 | 122 | Overwrite="true" |
120 | 123 | DestinationFile="$(_DestinationFileName)" |
121 | 124 | Condition="'$(ArchiveFormat)' == 'zip'"/> |
122 | | - <Exec Command="tar -C '$(_SymbolsOutputPathRoot)' -czf $(_DestinationFileName) ." |
| 125 | + <Exec Command="tar -czf $(_DestinationFileName) ." |
123 | 126 | IgnoreExitCode="true" |
124 | 127 | IgnoreStandardErrorWarningFormat="true" |
| 128 | + WorkingDirectory="$(_SymbolsOutputPathRoot)" |
125 | 129 | Condition="'$(ArchiveFormat)' == 'tar.gz'"/> |
126 | 130 |
|
127 | 131 | <Message Text="$(_SymbolsOutputPathRoot) -> $(_DestinationFileName)" Importance="high" /> |
|
0 commit comments