You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by da...@apache.org on 2015/07/10 10:40:43 UTC
[2/5] wicket git commit: Better escaping of long string
Better escaping of long string
Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/d937d366
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/d937d366
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/d937d366
Branch: refs/heads/master
Commit: d937d366bf5aaa7a744f4da6b4f38c30c6ceceec
Parents: d93cb8f
Author: Martijn Dashorst <da...@apache.org>
Authored: Fri Jul 10 09:12:04 2015 +0200
Committer: Martijn Dashorst <da...@apache.org>
Committed: Fri Jul 10 09:12:54 2015 +0200
----------------------------------------------------------------------
release-dashorst.sh | 72 +++++++++++++++++++++++++-----------------------
1 file changed, 38 insertions(+), 34 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/wicket/blob/d937d366/release-dashorst.sh
----------------------------------------------------------------------
diff --git a/release-dashorst.sh b/release-dashorst.sh
index dfe1680..4a1c85c 100755
--- a/release-dashorst.sh
+++ b/release-dashorst.sh
@@ -14,8 +14,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-# set -e
-# set -x
+set -e
+set -x
function fail {
>&2 echo "\033[31m
@@ -45,10 +45,10 @@ function getJdkToolchain {
}
function generate_promotion_script {
-
-echo "Generating release promotion script 'promote-$version.sh'"
-echo "#!/bin/sh
-echo -n \"Promoting release $version
+ echo "Generating release promotion script 'promote-$version.sh'"
+read -d '' script <<- EOF
+#!/bin/sh
+echo -n "Promoting release $version
Actions about to be performed:
------------------------------
@@ -56,7 +56,7 @@ Actions about to be performed:
$(cat $0 | tail -n +14)
------------------------------------------
-Press enter to continue or CTRL-C to abort\"
+Press enter to continue or CTRL-C to abort"
read
@@ -70,34 +70,37 @@ git push origin $tag
# promote the source distribution by moving it from the staging area to the release area
-svn mv https://dist.apache.org/repos/dist/dev/wicket/$version https://dist.apache.org/repos/dist/release/wicket -m \"Upload release to the mirrors\"
+svn mv https://dist.apache.org/repos/dist/dev/wicket/$version https://dist.apache.org/repos/dist/release/wicket -m "Upload release to the mirrors"
-mvn org.sonatype.plugins:nexus-staging-maven-plugin:LATEST:rc-release -DstagingRepositoryId=$stagingrepoid -DnexusUrl=https://repository.apache.org -DserverId=apache.releases.https -Ddescription=\"Release vote has passed\"
+mvn org.sonatype.plugins:nexus-staging-maven-plugin:LATEST:rc-release -DstagingRepositoryId=$stagingrepoid -DnexusUrl=https://repository.apache.org -DserverId=apache.releases.https -Ddescription="Release vote has passed"
# Renumber the next development iteration $next_version:
git checkout $GIT_BRANCH
mvn release:update-versions --batch-mode
-find . ! \\( -type d -name \"target\" -prune \\) -name pom.xml -exec sed -i \"\" -E \"s/$mvn_version_to_replace/$next_version/g\" {} \\;
-find . ! \\( -type d -name \"target\" -prune \\) -name pom.xml -exec sed -i \"\" -E \"s/$mvn_version_to_replace/$next_version/g\" {} \\;
-git add \`find . ! \\( -type d -name \"target\" -prune \\) -name pom.xml\`
-git commit -m \"Start next development version\"
+find . ! \( -type d -name "target" -prune \) -name pom.xml -exec sed -i "" -E "s/$mvn_version_to_replace/$next_version/g" {} \;
+find . ! \( -type d -name "target" -prune \) -name pom.xml -exec sed -i "" -E "s/$mvn_version_to_replace/$next_version/g" {} \;
+git add `find . ! \( -type d -name "target" -prune \) -name pom.xml`
+git commit -m "Start next development version"
git push
-echo \"Remove the previous version of Wicket using this command:
+echo "Remove the previous version of Wicket using this command:
+
+ svn rm https://dist.apache.org/repos/dist/release/wicket/$previous_version -m \"Remove previous version from mirrors\"
+
+"
+EOF
- svn rm https://dist.apache.org/repos/dist/release/wicket/$previous_version -m \\\"Remove previous version from mirrors\\\"
-
-" > promote-$version.sh
-chmod +x promote-$version.sh
-git add promote-$version.sh
+echo "$script" > promote-$version.sh
+ chmod +x promote-$version.sh
+ git add promote-$version.sh
}
function generate_rollback_script {
-
-echo "Generating release rollback script 'revert-$version.sh'"
-echo "#!/bin/sh
-echo -n\"Reverting release $version
+ echo "Generating release rollback script 'revert-$version.sh'"
+read -d '' script <<- EOF
+#!/bin/sh
+echo -n "Reverting release $version
Actions about to be performed:
------------------------------
@@ -105,7 +108,7 @@ Actions about to be performed:
$(cat $0 | tail -n +14)
------------------------------------------
-Press enter to continue or CTRL-C to abort\"
+Press enter to continue or CTRL-C to abort"
read
@@ -119,19 +122,20 @@ git push staging --delete refs/heads/$branch
git push staging --delete $tag
# clean up staging dist area
-svn rm https://dist.apache.org/repos/dist/dev/wicket/$version -m \"Release vote has failed\"
+svn rm https://dist.apache.org/repos/dist/dev/wicket/$version -m "Release vote has failed"
# clean up staging maven repository
-mvn org.sonatype.plugins:nexus-staging-maven-plugin:LATEST:rc-drop -DstagingRepositoryId=$stagingrepoid -DnexusUrl=https://repository.apache.org -DserverId=apache.releases.https -Ddescription=\"Release vote has failed\"
+mvn org.sonatype.plugins:nexus-staging-maven-plugin:LATEST:rc-drop -DstagingRepositoryId=$stagingrepoid -DnexusUrl=https://repository.apache.org -DserverId=apache.releases.https -Ddescription="Release vote has failed"
# clean up remaining release files
find . -name "*.releaseBackup" -exec rm {} \;
[ -f release.properties ] && rm release.properties
-" > revert-$version.sh
+EOF
+echo "$script" > revert-$version.sh
-chmod +x revert-$version.sh
-git add revert-$version.sh
+ chmod +x revert-$version.sh
+ git add revert-$version.sh
}
function generate_signatures_from_release {
@@ -486,8 +490,8 @@ stagingrepoid=$(mvn org.sonatype.plugins:nexus-staging-maven-plugin:LATEST:rc-li
echo "Closing staging repository with id $stagingrepoid"
mvn org.sonatype.plugins:nexus-staging-maven-plugin:LATEST:rc-close -DstagingRepositoryId=$stagingrepoid -DnexusUrl=https://repository.apache.org -DserverId=apache.releases.https -Ddescription="Release has been built, awaiting vote"
-generate_promotion_script()
-generate_rollback_script()
+generate_promotion_script
+generate_rollback_script
echo "Create and sign the source tarballs"
@@ -534,9 +538,9 @@ svn add *
svn commit -m "Upload wicket-$version to staging area"
popd
-generate_signatures_from_release()
-generate_release_vote_email()
-generate_announce_email()
+generate_signatures_from_release
+generate_release_vote_email
+generate_announce_email
# Done with the tasks, now print out the next things the release manager
# needs to do