|
9 | 9 | <Import Project="$(BuildPath)\assemblyinfo.targets" /> |
10 | 10 |
|
11 | 11 | <Target Name="PublishValidateVersionString"> |
| 12 | + <Error Condition="'$(OS)' != 'Windows_NT'" Text="Publish targets are Windows-only!" /> |
12 | 13 | <Error Condition="'$(VersionString)' == '' Or '$(VersionString)' == 'unknown'" |
13 | 14 | Text="Must set VersionString property on command line!" /> |
14 | 15 | </Target> |
15 | 16 |
|
16 | 17 | <Target Name="PublishValidateBranch"> |
| 18 | + <Error Condition="'$(OS)' != 'Windows_NT'" Text="Publish targets are Windows-only!" /> |
17 | 19 | <GitBranch LocalPath="$(SolutionDir)"> |
18 | 20 | <Output TaskParameter="Branch" PropertyName="GitBranch" /> |
19 | 21 | </GitBranch> |
20 | | - <Message Condition="$(VPreRelease) != '' And '$(GitBranch)' != '$(MasterBranchName)'" |
| 22 | + <Message Condition="$(IsDryRun) == 'true' And $(VPreRelease) != '' And '$(GitBranch)' != '$(MasterBranchName)'" |
21 | 23 | Text="NOTE: You are publishing from a non-master branch for pre-release version $(VPreRelease)" /> |
22 | | - <Error Condition="$(VPreRelease) == '' And '$(GitBranch)' != '$(MasterBranchName)'" |
| 24 | + <Error Condition="$(IsDryRun) == 'false' And $(VPreRelease) == '' And '$(GitBranch)' != '$(MasterBranchName)'" |
23 | 25 | Text="Please ensure all features have been merged into $(MasterBranchName) and that you are on the $(MasterBranchName) branch." /> |
24 | 26 | </Target> |
25 | 27 |
|
26 | 28 | <Target Name="PublishValidation" DependsOnTargets="PublishValidateVersionString;PopulateVersionInformation;PublishValidateBranch"> |
27 | | - <Error Condition="'$(OS)' != 'Windows_NT'" Text="Publish target is Windows-only!" /> |
| 29 | + <Error Condition="'$(OS)' != 'Windows_NT'" Text="Publish targets are Windows-only!" /> |
28 | 30 | <!-- Validate parsed VersionString --> |
29 | 31 | <RegexMatch Input="$(VMajor)" Expression="^[1-9]$"> |
30 | 32 | <Output PropertyName="VMajorValidated" TaskParameter="Output" /> |
|
61 | 63 | </Target> |
62 | 64 |
|
63 | 65 | <Target Name="PublishTag" Condition="$(IsDryRun) == 'false'" DependsOnTargets="PublishValidation"> |
| 66 | + <Error Condition="'$(OS)' != 'Windows_NT'" Text="Publish targets are Windows-only!" /> |
64 | 67 | <Message Text="Tagging with $(GitTagMessage)" /> |
65 | 68 | <GitClient Command="tag" Arguments="--message $(GitTagMessage)" LocalPath="$(SolutionDir)" /> |
66 | 69 | <Message Text="Pushing tag $(GitTagVersion). NOTE: this requires a remote named "basho"" /> |
67 | 70 | <GitClient Command="push" Arguments="basho "$(GitTagVersion)"" LocalPath="$(SolutionDir)" /> |
68 | 71 | </Target> |
69 | 72 |
|
70 | 73 | <Target Name="PublishBuildRelease" DependsOnTargets="GenerateCommonAssemblyInfo"> |
| 74 | + <Error Condition="'$(OS)' != 'Windows_NT'" Text="Publish targets are Windows-only!" /> |
71 | 75 | <Message Text="MSBuild properties: Configuration=Release;SolutionDir=$(SolutionDir);VersionString=$(VersionString)" /> |
72 | 76 | <MSBuild Projects="$(SolutionFile)" Properties="Configuration=Release;SolutionDir=$(SolutionDir);VersionString=$(VersionString)" /> |
73 | 77 | </Target> |
|
93 | 97 | </Target> |
94 | 98 |
|
95 | 99 | <Target Name="PublishNuGetPackage" Condition="$(IsDryRun) == 'false'" DependsOnTargets="PublishValidation"> |
| 100 | + <Error Condition="'$(OS)' != 'Windows_NT'" Text="Publish targets are Windows-only!" /> |
96 | 101 | <XmlQuery XmlFileName="$(RiakClientPackagesConfig)" XPath="/packages/package[@id='Newtonsoft.Json']/@version"> |
97 | 102 | <Output TaskParameter="Values" PropertyName="NewtonsoftJsonVersion" /> |
98 | 103 | </XmlQuery> |
|
121 | 126 | </Target> |
122 | 127 |
|
123 | 128 | <Target Name="PublishGitHubRelease" Condition="$(IsDryRun) == 'false'" DependsOnTargets="PublishValidation"> |
| 129 | + <Error Condition="'$(OS)' != 'Windows_NT'" Text="Publish targets are Windows-only!" /> |
124 | 130 | <PropertyGroup Condition="'$(VPreRelease)' != ''"> |
125 | 131 | <IsPreReleaseArg>-IsPreRelease</IsPreReleaseArg> |
126 | 132 | </PropertyGroup> |
|
129 | 135 | </Target> |
130 | 136 |
|
131 | 137 | <Target Name="Publish" |
132 | | - DependsOnTargets="PublishValidation;PublishTag;PublishBuildRelease;PublishNuGetPackage;PublishGitHubRelease" /> |
| 138 | + DependsOnTargets="RestorePackages;PublishValidation;PublishTag;PublishBuildRelease;PublishNuGetPackage;PublishGitHubRelease" /> |
133 | 139 |
|
134 | 140 | <Target Name="GitSubmodule" Condition="!Exists('$(ProtoMsgCsvFile)')"> |
135 | 141 | <GitClient Command="submodule" Arguments="update --init" LocalPath="$(SolutionDir)" /> |
|
0 commit comments