You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

patch.xml 1.9 kB

11 years ago
11 years ago
11 years ago
11 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. <?xml version="1.0"?>
  2. <!--
  3. Licensed to the Apache Software Foundation (ASF) under one or more
  4. contributor license agreements. See the NOTICE file distributed with
  5. this work for additional information regarding copyright ownership.
  6. The ASF licenses this file to You under the Apache License, Version 2.0
  7. (the "License"); you may not use this file except in compliance with
  8. the License. You may obtain a copy of the License at
  9. http://www.apache.org/licenses/LICENSE-2.0
  10. Unless required by applicable law or agreed to in writing, software
  11. distributed under the License is distributed on an "AS IS" BASIS,
  12. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. See the License for the specific language governing permissions and
  14. limitations under the License.
  15. -->
  16. <!--
  17. =======================================================================
  18. Use Apache Ant to generate a patch file for Apache Ant.
  19. =======================================================================
  20. -->
  21. <project name="create-patch" default="patchpackage" basedir=".">
  22. <property environment="env"/>
  23. <property name="patch.package" value="patch.tar.gz"/>
  24. <property name="patch.file" value="patch.txt"/>
  25. <condition property="git.found">
  26. <or>
  27. <available file="git" filepath="${env.PATH}"/>
  28. <available file="git.exe" filepath="${env.PATH}"/>
  29. <available file="git.exe" filepath="${env.Path}"/>
  30. </or>
  31. </condition>
  32. <target name="createpatch">
  33. <fail unless="git.found"
  34. message="You need a version of git to create the patch"/>
  35. <exec executable="git" output="${patch.file}">
  36. <arg value="diff"/>
  37. </exec>
  38. </target>
  39. <target name="patchpackage" depends="createpatch">
  40. <gzip src="${patch.file}" destfile="${patch.file}.gz"/>
  41. </target>
  42. </project>