ProjectDefinition.st
changeset 14361 0e832917e039
parent 14354 4a571b9eb43c
child 14510 5274ba4185d8
equal deleted inserted replaced
14360:98833670676c 14361:0e832917e039
  1073     ].
  1073     ].
  1074 
  1074 
  1075     self classNamesAndAttributes:newSpec usingCompiler:compilerOrNil
  1075     self classNamesAndAttributes:newSpec usingCompiler:compilerOrNil
  1076 ! !
  1076 ! !
  1077 
  1077 
  1078 !ProjectDefinition class methodsFor:'accessing - svn'!
       
  1079 
       
  1080 svnRevision
       
  1081 
       
  1082     "
       
  1083         Answers SVN revision of given package. The revision is computed
       
  1084         as follows:
       
  1085         1) Look at package directory if there is .svn administration
       
  1086            directory. If so, uses SVN to obtain SVN revision & return
       
  1087         2) If svnRevisionNr return non-nil, use that as SVN revision & return
       
  1088         3) If everything fails, compute maximum from all revision of all
       
  1089            classes & extensions
       
  1090     "
       
  1091     | pkgDir revNr |
       
  1092 
       
  1093     "1)"
       
  1094     pkgDir := self packageDirectory.
       
  1095     (pkgDir notNil and: [pkgDir exists and: [(pkgDir / '.svn') exists]]) ifTrue:
       
  1096         [[revNr := (SVN::InfoCommand new
       
  1097                     workingCopy: (SVN::WorkingCopy branch: (SVN::Branch new) path: pkgDir);
       
  1098                     execute) anyOne revision]
       
  1099                         value
       
  1100                         "/on: Error do: [revNr := nil]
       
  1101                         ].
       
  1102     revNr ifNotNil:[^SVN::Revision number:revNr].
       
  1103     "2)"
       
  1104     "We have to explicitly check for existence of svnRevisionNr,
       
  1105      because we don't want to invoke inherited method"
       
  1106     (self class methodDictionary includesKey: #svnRevisionNr)
       
  1107         ifTrue:[revNr := self perform:#svnRevisionNr].
       
  1108     revNr ifNotNil:[^SVN::Revision number:(revNr asString select:[:e|e isDigit])].
       
  1109 
       
  1110     "3)"
       
  1111     revNr := (self searchForClassesWithProject: self package)
       
  1112                 inject: 0
       
  1113                 into:
       
  1114                     [:rev :cls|
       
  1115                     ((cls revision ? '.') includes: $.)"/ CVS revision number?
       
  1116                         ifTrue:[rev]
       
  1117                         ifFalse:[rev max: (cls revision ? '0') asNumber]].
       
  1118     ^revNr ~= 0
       
  1119         ifTrue: [SVN::Revision number:revNr]
       
  1120         ifFalse:[SVN::Revision head]
       
  1121 
       
  1122     "
       
  1123         stx_libbasic svnRevision
       
  1124         stx_goodies_libsvn svnRevision
       
  1125         stx_goodies_libsvn revision
       
  1126 
       
  1127     "
       
  1128 
       
  1129     "Created: / 15-06-2009 / 11:54:33 / Jan Vrany <vranyj1@fel.cvut.cz>"
       
  1130     "Modified: / 22-08-2009 / 09:06:29 / Jan Vrany <vranyj1@fel.cvut.cz>"
       
  1131     "Modified: / 13-02-2010 / 19:27:13 / Jan Vrany <jan.vrany@fit.cvut.cz>"
       
  1132 ! !
       
  1133 
  1078 
  1134 !ProjectDefinition class methodsFor:'accessing - tests'!
  1079 !ProjectDefinition class methodsFor:'accessing - tests'!
  1135 
  1080 
  1136 excludedFromTestSuite
  1081 excludedFromTestSuite
  1137     "List of testcases and/or tests excluded from testsuite.
  1082     "List of testcases and/or tests excluded from testsuite.
  4379 '@REM -------
  4324 '@REM -------
  4380 @REM make using lcc compiler
  4325 @REM make using lcc compiler
  4381 @REM type lccmake, and wait...
  4326 @REM type lccmake, and wait...
  4382 @REM do not edit - automatically generated from ProjectDefinition
  4327 @REM do not edit - automatically generated from ProjectDefinition
  4383 @REM -------
  4328 @REM -------
  4384 make.exe -N -f bc.mak USELCC=1 %%*
  4329 make.exe -N -f bc.mak -DUSELCC=1 %%*
  4385 
  4330 
  4386 %(SUBPROJECT_LCCMAKE_CALLS)
  4331 %(SUBPROJECT_LCCMAKE_CALLS)
  4387 '
  4332 '
  4388 
  4333 
  4389     "Created: / 03-09-2012 / 19:49:23 / cg"
  4334     "Created: / 03-09-2012 / 19:49:23 / cg"
  4490 '@REM -------
  4435 '@REM -------
  4491 @REM make using mingw gnu compiler
  4436 @REM make using mingw gnu compiler
  4492 @REM type mingwmake, and wait...
  4437 @REM type mingwmake, and wait...
  4493 @REM do not edit - automatically generated from ProjectDefinition
  4438 @REM do not edit - automatically generated from ProjectDefinition
  4494 @REM -------
  4439 @REM -------
  4495 make.exe -N -f bc.mak USEMINGW=1 %%*
  4440 make.exe -N -f bc.mak -DUSEMINGW=1 %%*
  4496 
  4441 
  4497 %(SUBPROJECT_MINGWMAKE_CALLS)
  4442 %(SUBPROJECT_MINGWMAKE_CALLS)
  4498 '
  4443 '
  4499 
  4444 
  4500     "Created: / 05-09-2012 / 19:44:51 / cg"
  4445     "Created: / 05-09-2012 / 19:44:51 / cg"
  4580 '@REM -------
  4525 '@REM -------
  4581 @REM make using tcc compiler (Tiny-C)
  4526 @REM make using tcc compiler (Tiny-C)
  4582 @REM type tccmake, and wait...
  4527 @REM type tccmake, and wait...
  4583 @REM do not edit - automatically generated from ProjectDefinition
  4528 @REM do not edit - automatically generated from ProjectDefinition
  4584 @REM -------
  4529 @REM -------
  4585 make.exe -N -f bc.mak USETCC=1 %%*
  4530 make.exe -N -f bc.mak -DUSETCC=1 %%*
  4586 
  4531 
  4587 %(SUBPROJECT_TCCMAKE_CALLS)
  4532 %(SUBPROJECT_TCCMAKE_CALLS)
  4588 '
  4533 '
  4589 
  4534 
  4590     "Created: / 03-09-2012 / 19:50:41 / cg"
  4535     "Created: / 03-09-2012 / 19:50:41 / cg"
  6767 ! !
  6712 ! !
  6768 
  6713 
  6769 !ProjectDefinition class methodsFor:'documentation'!
  6714 !ProjectDefinition class methodsFor:'documentation'!
  6770 
  6715 
  6771 version
  6716 version
  6772     ^ '$Header: /cvs/stx/stx/libbasic/ProjectDefinition.st,v 1.394 2012-09-19 08:33:54 stefan Exp $'
  6717     ^ '$Header: /cvs/stx/stx/libbasic/ProjectDefinition.st,v 1.395 2012-09-26 19:17:12 cg Exp $'
  6773 !
  6718 !
  6774 
  6719 
  6775 version_CVS
  6720 version_CVS
  6776     ^ '$Header: /cvs/stx/stx/libbasic/ProjectDefinition.st,v 1.394 2012-09-19 08:33:54 stefan Exp $'
  6721     ^ '$Header: /cvs/stx/stx/libbasic/ProjectDefinition.st,v 1.395 2012-09-26 19:17:12 cg Exp $'
  6777 !
  6722 !
  6778 
  6723 
  6779 version_SVN
  6724 version_SVN
  6780     ^ '§ Id: ProjectDefinition.st 10645 2011-06-09 15:28:45Z vranyj1  §'
  6725     ^ '§ Id: ProjectDefinition.st 10645 2011-06-09 15:28:45Z vranyj1  §'
  6781 ! !
  6726 ! !