Permalink
Browse files

[LUCENENET-454] added checks in build.targets to make sure ArtifactPa…

…ths isn't empty, causing the wrong files to be wiped (critical!)

fixed build.cmd files to set proper environment variables

git-svn-id: https://svn.apache.org/repos/asf/incubator/lucene.net/trunk@1198125 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information...
1 parent 7205985 commit ed02e19277dc82bb0897d076557d2fd3f4515d7f @ccurrens ccurrens committed Nov 6, 2011
Showing with 16 additions and 6 deletions.
  1. +2 −2 build.cmd
  2. +2 −2 build/scripts/build.cmd
  3. +12 −2 build/scripts/build.targets
View
@@ -17,8 +17,8 @@ GOTO LicenseEnd
limitations under the License.
:LicenseEnd
-SET TARGETS="simple"
-SET AREA="all"
+SET TARGETS=simple
+SET AREA=all
SET CONFIGURATION=Release
IF [%1] NEQ [] SET TARGETS=%1
IF [%2] NEQ [] SET AREA=%2
@@ -17,8 +17,8 @@ GOTO LicenseEnd
limitations under the License.
:LicenseEnd
-SET TARGETS ="all"
-SET AREA = "all"
+SET TARGETS=all
+SET AREA=all
IF [%1] NEQ [] SET TARGETS=%1
IF [%2] NEQ [] SET AREA=%2
@@ -68,11 +68,20 @@
<Import Project="SpellChecker/project.targets" Condition="'$(Area)' == 'spellchecker'" />
- <ItemGroup>
+ <ItemGroup Condition="'$(ArtifactsFolder)' != ''">
<CleanFiles Include="$(ArtifactsFolder)\**\*.*" />
<CleanFiles Include="$(RootFolder)\bin\**\*" Exclude="$(RootFolder)\**\.svn\*; $(RootFolder)\.svn\*" />
</ItemGroup>
+ <Target Name="diag">
+ <Message Text="TempFolder=$(TempFolder)" />
+ <Message Text="BuildFolder=$(BuildFolder)" />
+ <Message Text="ScriptsFolder=$(ScriptsFolder)" />
+ <Message Text="RootFolder=$(RootFolder)" />
+ <Message Text="Area=$(Area)" />
+ <Message Text="ArtifactsFolder=$(ArtifactsFolder)" />
+ </Target>
+
<Target Name="paths">
<CallTarget Targets="@(PathsTarget)" />
</Target>
@@ -83,8 +92,9 @@
</Target>
<Target Name="clean">
+ <Error Condition="'$(ArtifactsFolder)' == ''" Text="ArtifactsFolder is empty! 'Area' may be empty or invalid." />
<Message Text="Files To Clean: @(CleanFiles)" />
- <Delete Files="@(CleanFiles)" />
+ <Delete Files="@(CleanFiles)" />
</Target>

0 comments on commit ed02e19

Please sign in to comment.