| <?xml version="1.0" encoding="UTF-8"?> |
| |
| <!-- |
| |
| Licensed to the Apache Software Foundation (ASF) under one or more |
| contributor license agreements. See the NOTICE file distributed with |
| this work for additional information regarding copyright ownership. |
| The ASF licenses this file to You under the Apache License, Version 2.0 |
| (the "License"); you may not use this file except in compliance with |
| the License. You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, software |
| distributed under the License is distributed on an "AS IS" BASIS, |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or |
| implied. See the License for the specific language governing |
| permissions and limitations under the License. |
| |
| --> |
| |
| <project name="svn-deps"> |
| |
| <!-- |
| Sets global SVN properties of the workspace: |
| is.svn, svn.revision and svn.info |
| --> |
| <target name="-svn-info"> |
| <svn-info dir="${basedir}" prefix="global"/> |
| <condition property="is.svn"> |
| <isset property="global.entry.revision"/> |
| </condition> |
| <condition property="svn.revision" value="${global.entry.revision}" else="unknown"> |
| <isset property="is.svn"/> |
| </condition> |
| <condition property="svn.info" |
| value="${global.entry.repository.root} ${svn.revision}"> |
| <isset property="is.svn"/> |
| </condition> |
| <condition property="svn.root" |
| value="${global.entry.repository.root}" |
| else="http://svn.apache.org/repos/asf"> |
| <isset property="is.svn"/> |
| </condition> |
| |
| <tstamp> |
| <format property="svn.info" pattern="'Unknown revision at' dd-MMM-yyyy hh:mm aa"/> |
| </tstamp> |
| </target> |
| |
| <macrodef name="svn-info"> |
| <attribute name="dir" /> |
| <attribute name="prefix" default=""/> |
| <sequential> |
| <tempfile suffix=".xml" property="@{dir}.tmp"/> |
| <exec executable="svn" output="${@{dir}.tmp}" resultproperty="@{dir}.svn.status"> |
| <arg line="info @{dir} --non-interactive --xml" /> |
| </exec> |
| <condition property="@{dir}.info.file" value="${@{dir}.tmp}"> |
| <equals arg1="0" arg2="${@{dir}.svn.status}"/> |
| </condition> |
| <xmlproperty file="${@{dir}.info.file}" prefix="@{prefix}" |
| keeproot="no" collapseAttributes="yes"/> |
| <delete file="${@{dir}.tmp}" quiet="true"/> |
| </sequential> |
| </macrodef> |
| |
| </project> |