|
238 | 238 |
|
239 | 239 | <property name="manifest.file" location="${build.dir}/MANIFEST.MF"/>
|
240 | 240 |
|
241 |
| - <!-- |
242 |
| - we attempt to exec svnversion to get details build information |
243 |
| - for jar manifests. this property can be set at runtime to an |
244 |
| - explicit path as needed, or ant will just try to find it in the |
245 |
| - default PATH. (this is useful for Hudson) |
246 |
| - --> |
247 |
| - <property name="svnversion.exe" value="svnversion" /> |
248 |
| - <property name="svn.exe" value="svn" /> |
| 241 | + <property name="git.exe" value="git" /> |
249 | 242 | <property name="perl.exe" value="perl" />
|
250 | 243 |
|
251 | 244 | <property name="python.exe" value="python" />
|
|
615 | 608 | <attribute name="manifest.file" default="${manifest.file}"/>
|
616 | 609 | <element name="additional-manifest-attributes" optional="true"/>
|
617 | 610 | <sequential>
|
618 |
| - <local name="-svnversion-raw"/> |
619 |
| - <local name="svnversion"/> |
620 |
| - |
621 |
| - <!-- If possible, include the svnversion --> |
622 |
| - <exec dir="." executable="${svnversion.exe}" outputproperty="-svnversion-raw" failifexecutionfails="false"/> |
623 |
| - <condition property="svnversion" value="${-svnversion-raw}" else="unknown"> |
624 |
| - <matches pattern="^\s*[\d:MSP]+\s*$" string="${-svnversion-raw}" casesensitive="true"/> |
625 |
| - </condition> |
| 611 | + <exec dir="." executable="${git.exe}" outputproperty="checkoutid" failifexecutionfails="false"> |
| 612 | + <arg value="log"/> |
| 613 | + <arg value="--format='%H'"/> |
| 614 | + <arg value="-n"/> |
| 615 | + <arg value="1"/> |
| 616 | + </exec> |
626 | 617 |
|
627 | 618 | <manifest file="@{manifest.file}">
|
628 | 619 | <!--
|
|
654 | 645 | <attribute name="Implementation-Title" value="@{implementation.title}"/>
|
655 | 646 | <!-- impl version can be any string -->
|
656 | 647 | <attribute name="Implementation-Version"
|
657 |
| - value="${version} ${svnversion} - ${user.name} - ${DSTAMP} ${TSTAMP}"/> |
| 648 | + value="${version} ${checkoutid} - ${user.name} - ${DSTAMP} ${TSTAMP}"/> |
658 | 649 | <attribute name="Implementation-Vendor"
|
659 | 650 | value="The Apache Software Foundation"/>
|
660 | 651 | <attribute name="X-Compile-Source-JDK" value="${javac.source}"/>
|
@@ -1540,7 +1531,7 @@ ${tests-output}/junit4-*.suites - per-JVM executed suites
|
1540 | 1531 |
|
1541 | 1532 | $ ant -Dclover.license.path=/path/to/clover.license -Drun.clover=true ...
|
1542 | 1533 |
|
1543 |
| - Apache Lucene/Solr source checkouts from SVN already contain the |
| 1534 | + Apache Lucene/Solr source checkouts from Git already contain the |
1544 | 1535 | file, but source distributions cannot because of legal reasons.
|
1545 | 1536 | #########################################################################
|
1546 | 1537 |
|
@@ -2170,51 +2161,21 @@ ${ant.project.name}.test.dependencies=${test.classpath.list}
|
2170 | 2161 | <target name="validate">
|
2171 | 2162 | </target>
|
2172 | 2163 |
|
2173 |
| - <property name="svn.export.dir" location="${build.dir}/svn-export"/> |
2174 |
| - <macrodef name="svn-export-source" |
2175 |
| - description="Runs 'svn export' with the same URL and revision as the current working copy."> |
| 2164 | + <property name="src.export.dir" location="${build.dir}/src-export"/> |
| 2165 | + <macrodef name="export-source" |
| 2166 | + description="Exports the source to src.export.dir."> |
2176 | 2167 | <attribute name="source.dir"/>
|
2177 | 2168 | <sequential>
|
2178 |
| - <delete dir="${svn.export.dir}" includeemptydirs="true" failonerror="false"/> |
2179 |
| - <get-svn-info directory="@{source.dir}"/> |
2180 |
| - <exec dir="@{source.dir}" executable="${svn.exe}" failonerror="true"> |
2181 |
| - <arg value="export"/> |
2182 |
| - <arg value="--native-eol"/> |
2183 |
| - <arg value="LF"/> |
2184 |
| - <arg value="-r"/> |
2185 |
| - <arg value="${svn.Revision}"/> |
2186 |
| - <arg value="${svn.URL}"/> |
2187 |
| - <arg value="${svn.export.dir}"/> |
| 2169 | + <delete dir="${src.export.dir}" includeemptydirs="true" failonerror="false"/> |
| 2170 | + <exec dir="@{source.dir}" executable="${git.exe}" failonerror="true"> |
| 2171 | + <arg value="checkout-index"/> |
| 2172 | + <arg value="-a"/> |
| 2173 | + <arg value="-f"/> |
| 2174 | + <arg value="--prefix=${src.export.dir}/"/> |
2188 | 2175 | </exec>
|
2189 | 2176 | </sequential>
|
2190 | 2177 | </macrodef>
|
2191 | 2178 |
|
2192 |
| - <macrodef name="get-svn-info" |
2193 |
| - description="Populates properties svn.URL and svn.Revision using 'svn info'."> |
2194 |
| - <attribute name="directory"/> |
2195 |
| - <sequential> |
2196 |
| - <exec dir="@{directory}" executable="${svnversion.exe}" outputproperty="svn.ver"/> |
2197 |
| - <fail message="A subversion checkout is required for this target"> |
2198 |
| - <condition> |
2199 |
| - <matches pattern="(exported|unversioned.*)" string="${svn.ver}" casesensitive="false"/> |
2200 |
| - </condition> |
2201 |
| - </fail> |
2202 |
| - <exec dir="@{directory}" executable="${svn.exe}" outputproperty="svn.info" failonerror="true"> |
2203 |
| - <arg value="info"/> |
2204 |
| - </exec> |
2205 |
| - <loadproperties> |
2206 |
| - <propertyresource name="svn.info"/> |
2207 |
| - <filterchain> |
2208 |
| - <linecontainsregexp> |
2209 |
| - <regexp pattern="(URL|Revision):"/> |
2210 |
| - </linecontainsregexp> |
2211 |
| - <replacestring from=": " to="="/> |
2212 |
| - <prefixlines prefix="svn."/> |
2213 |
| - </filterchain> |
2214 |
| - </loadproperties> |
2215 |
| - </sequential> |
2216 |
| - </macrodef> |
2217 |
| - |
2218 | 2179 | <macrodef name="make-checksums" description="Macro for building checksum files">
|
2219 | 2180 | <attribute name="file"/>
|
2220 | 2181 | <sequential>
|
|
0 commit comments