blob: ed42fbbe4997db789305f9cc6d5ae334827f6b28 [file] [log] [blame]
<!--
******************************************************************************
* Copyright (c) 2016 Oracle
* 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:
* Konstantin Komissarchik - initial implementation and ongoing maintenance
******************************************************************************
-->
<project name="corundum.macro.trim-version">
<scriptdef name="trim-version" language="javascript">
<attribute name="version"/>
<attribute name="property"/>
var version = attributes.get( "version" );
while( version.endsWith( ".0" ) )
{
version = version.substring( 0, version.length() - 2 );
}
project.setProperty( attributes.get( "property" ), version );
</scriptdef>
</project>