You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jclouds.apache.org by na...@apache.org on 2015/08/02 11:47:37 UTC
svn commit: r10044 - /dev/jclouds/prepare_release.sh
Author: nacx
Date: Sun Aug 2 09:47:37 2015
New Revision: 10044
Log:
Improve version replacing and always double-check the repo clean state
Modified:
dev/jclouds/prepare_release.sh
Modified: dev/jclouds/prepare_release.sh
==============================================================================
--- dev/jclouds/prepare_release.sh (original)
+++ dev/jclouds/prepare_release.sh Sun Aug 2 09:47:37 2015
@@ -69,7 +69,7 @@ function join {
echo "$*"
}
-echo "Collecting release info..."
+echo "Collecting release data..."
CURRENT=$(current_snapshot)
RC=$(rc_version)
@@ -99,13 +99,17 @@ for REPO in ${REPOS[@]}; do
TAG=${REPO}-${RELEASE}-${RC}
cd ${REPO}
+
+ # Sanity check to avoid the "error building tree" error
+ # Make sure everything is in the right clean state
+ git fetch origin
+ git reset --hard origin/${BRANCH}
# Update to the release version, verify the build and tag
# We don't release if there are SNAPSHOT dependencies, so we can assume that
# this will only match the current SNAPSHOT versions
- find . -name pom.xml -exec sed -i -e "s/${CURRENT}/${RELEASE}/g" {} \;
- find . -name pom.xml -exec sed -i -e "s/<tag>HEAD<\/tag>/<tag>${TAG}<\/tag>/g" {} \;
- find . -name pom.xml-e -delete
+ find . -name pom.xml -exec sed -i '' -e "s/${CURRENT}/${RELEASE}/g" {} \;
+ find . -name pom.xml -exec sed -i '' -e "s/<tag>HEAD<\/tag>/<tag>${TAG}<\/tag>/g" {} \;
mvn clean install
git add .
@@ -123,7 +127,8 @@ for REPO in ${REPOS[@]}; do
git checkout ${BRANCH}
git apply /tmp/${REPO}-${NEXT}.diff
- mvn clean install
+ # We just changed the snapshot version. We don't really need to run the tests again
+ mvn clean install -DskipTests
git add .
git commit -m "Next development version ${NEXT}"