| <?xml version="1.0"?> |
| <!-- |
| Copyright (c) 2017 Eike Stepper (Loehne, Germany) and others. |
| All rights reserved. This program and the accompanying materials |
| are made available under the terms of the Eclipse Public License v1.0 |
| which accompanies this distribution, and is available at |
| http://www.eclipse.org/legal/epl-v10.html |
| |
| Contributors: |
| Eike Stepper - initial API and implementation |
| --> |
| <project name="check-commit-message" default="check-commit-message"> |
| |
| <property environment="env" /> |
| |
| <target name="check-commit-message" if="GERRIT_CHANGE_SUBJECT"> |
| <condition property="commit.msg.ok" value="true"> |
| <matches pattern="^\[[1-9][0-9]*\] .*$" string="${GERRIT_CHANGE_SUBJECT}"/> |
| </condition> |
| <fail message="The commit message is not of the form '[bug-id] bug-subject'." unless="commit.msg.ok"/> |
| </target> |
| |
| </project> |