Set -Pmilestone automatically based on pom version
This commit is contained in:
9
mvnw
vendored
9
mvnw
vendored
@@ -46,6 +46,15 @@ if [ -z "$MAVEN_SKIP_RC" ] ; then
|
|||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
VERSION=$(sed `dirname $0`/pom.xml -e '/<parent/,+4d' | grep '<version' | head -1 | sed -e 's/.*>\(.*\)<.*/\1/')
|
||||||
|
if echo $VERSION | egrep -q 'M|RC'; then
|
||||||
|
echo Activating \"milestone\" profile for version=\"$VERSION\"
|
||||||
|
echo $MAVEN_OPTS | grep -q milestone || MAVEN_OPTS="$MAVEN_OPTS -Pmilestone"
|
||||||
|
else
|
||||||
|
echo Deactivating \"milestone\" profile for version=\"$VERSION\"
|
||||||
|
echo $MAVEN_OPTS | grep -q milestone && MAVEN_OPTS=$(echo $MAVEN_OPTS | sed -e 's/-Pmilestone//')
|
||||||
|
fi
|
||||||
|
|
||||||
# OS specific support. $var _must_ be set to either true or false.
|
# OS specific support. $var _must_ be set to either true or false.
|
||||||
cygwin=false;
|
cygwin=false;
|
||||||
darwin=false;
|
darwin=false;
|
||||||
|
|||||||
Reference in New Issue
Block a user