2 # @License EPL-1.0 <http://spdx.org/licenses/EPL-1.0>
3 ##############################################################################
4 # Copyright (c) 2015 The Linux Foundation and others.
6 # All rights reserved. This program and the accompanying materials
7 # are made available under the terms of the Eclipse Public License v1.0
8 # which accompanies this distribution, and is available at
9 # http://www.eclipse.org/legal/epl-v10.html
10 ##############################################################################
12 # DATESTAMP=true # Example
13 # RELEASE_TAG=Helium-SR2 # Example
14 # RELEASE_BRANCH=stable/helium # Example
16 # Directory to put git format-patches
17 PATCH_DIR=`pwd`/patches
19 if [ "$DATESTAMP" == "true" ]; then
20 export RELEASE_TAG=$RELEASE_TAG-`date -u +v%Y%m%d%H%M`
24 ./scripts/version.sh release $RELEASE_TAG
25 git submodule foreach "git commit -am \"Release $RELEASE_TAG\" || true"
26 git commit -am "Release $RELEASE_TAG"
29 mv taglist.log $PATCH_DIR
30 modules=`xmlstarlet sel -N x=http://maven.apache.org/POM/4.0.0 -t -m '//x:modules' -v '//x:module' pom.xml`
31 for module in $modules; do
33 git format-patch --stdout origin/$RELEASE_BRANCH > $PATCH_DIR/${module//\//-}.patch
37 ./scripts/fix-relativepaths.sh