Updated Branches: refs/heads/master 4007779db -> 462dc2bda
Some incremental improvements Project: http://git-wip-us.apache.org/repos/asf/couchdb-admin/repo Commit: http://git-wip-us.apache.org/repos/asf/couchdb-admin/commit/462dc2bd Tree: http://git-wip-us.apache.org/repos/asf/couchdb-admin/tree/462dc2bd Diff: http://git-wip-us.apache.org/repos/asf/couchdb-admin/diff/462dc2bd Branch: refs/heads/master Commit: 462dc2bdab7a8e23ae19e4ed6752f709062a9cb8 Parents: 4007779 Author: Noah Slater <[email protected]> Authored: Thu Mar 7 23:20:33 2013 +0000 Committer: Noah Slater <[email protected]> Committed: Thu Mar 7 23:20:33 2013 +0000 ---------------------------------------------------------------------- email/discuss_release.sh | 107 +++++++++++++++++++++++++++++++++++ email/result_release.txt | 19 ++++++ release/build_candidate.sh | 4 +- release/build_candidate_aws.sh | 2 +- release/check_docs.sh | 3 + release/generate_proposal.sh | 107 ----------------------------------- release/publish_candidate.sh | 32 ++++++---- 7 files changed, 151 insertions(+), 123 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/couchdb-admin/blob/462dc2bd/email/discuss_release.sh ---------------------------------------------------------------------- diff --git a/email/discuss_release.sh b/email/discuss_release.sh new file mode 100755 index 0000000..4b0d48a --- /dev/null +++ b/email/discuss_release.sh @@ -0,0 +1,107 @@ +#!/bin/sh -e + +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy of +# the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations under +# the License. + +# This script is for use by committers. +# +# It should be used in accordance with the project release procedure. +# +# cf. http://wiki.apache.org/couchdb/Release_Procedure + +GIT_URL=https://git-wip-us.apache.org/repos/asf?p=couchdb.git;a=blob_plain; + +EMAIL_TPL=discuss_release.txt + +if test -n "$1"; then + cache_dir=$1 +else + echo "error: no cache directory" + exit 1 +fi + +if test -n "$2"; then + branch=$2 +else + echo "error: no branch" + exit 1 +fi + +if test -n "$3"; then + version=$3 +else + echo "error: no version" + exit 1 +fi + +log () { + printf "\033[1;31m$1\033[0m\n" +} + +cd `dirname $0` + +basename=`basename $0` + +tmp_dir=`mktemp -d /tmp/$basename.XXXXXX` || exit 1 + +log "Parsing documentation..." + +email_in_file=$tmp_dir/email.txt.in + +cat $EMAIL_TPL > $email_in_file + +python <<EOF +def get_section(doc_path, version): + doc_file = open(doc_path) + copy = False + section = "" + for line in doc_file.readlines(): + if line.startswith("Version"): + if line == "Version $version\n": + copy = True + continue + else: + if copy: + break + if line.startswith("-"): + continue + if copy: + if line.strip(): + section += line + return section.rstrip() + +news = get_section("$cache_dir/branch/$branch/NEWS", "$version") + +email_in_file = open("$email_in_file") + +email_in_file_content = email_in_file.read() + +email_in_file_content = email_in_file_content.replace("%NEWS%", news) + +email_in_file = open("$email_in_file", "w") + +email_in_file.write(email_in_file_content) +EOF + +email_file=$tmp_dir/email.txt + +changes=$GIT_URL"f=CHANGES;hb=$branch" + +sed -e "s|%VERSION%|$version|g" \ + -e "s|%CHANGES%|$changes|g" \ + < $email_in_file > $email_file + +echo "Email text written to:" $email_file + +echo "Send the email to: [email protected]" + +echo "Files in: $tmp_dir" http://git-wip-us.apache.org/repos/asf/couchdb-admin/blob/462dc2bd/email/result_release.txt ---------------------------------------------------------------------- diff --git a/email/result_release.txt b/email/result_release.txt new file mode 100644 index 0000000..25276b7 --- /dev/null +++ b/email/result_release.txt @@ -0,0 +1,19 @@ +Subject: [RESULT] (Was: [VOTE] Release Apache CouchDB %VERSION%-rc.%CANDIDATE%) + +Dear community, + +The final tally of the vote is: + + %TALLY% + +This is a successful majority approval, and the vote passes. + +I shall prepare the release as soon as possible. + +The individual votes are as follows: + + %INDIVIDUAL_VOTES% + +Thanks, + +%VOTE_THREAD% http://git-wip-us.apache.org/repos/asf/couchdb-admin/blob/462dc2bd/release/build_candidate.sh ---------------------------------------------------------------------- diff --git a/release/build_candidate.sh b/release/build_candidate.sh index fd0deb0..a56aff6 100755 --- a/release/build_candidate.sh +++ b/release/build_candidate.sh @@ -79,7 +79,7 @@ cat > $diff_file <<EOF ^Only in $tmp_dir/apache-couchdb-1.3.0/src/couchdb/priv: couchjs.1\$ EOF -build_file=build.mk +build_file=$tmp_dir/build.mk cat > $build_file <<EOF URL=https://git-wip-us.apache.org/repos/asf/couchdb.git @@ -166,4 +166,4 @@ make -f $build_file check log "Check complete..." -echo "Files in $tmp_dir" +echo "Files in: $tmp_dir" http://git-wip-us.apache.org/repos/asf/couchdb-admin/blob/462dc2bd/release/build_candidate_aws.sh ---------------------------------------------------------------------- diff --git a/release/build_candidate_aws.sh b/release/build_candidate_aws.sh index 1213b44..117183f 100755 --- a/release/build_candidate_aws.sh +++ b/release/build_candidate_aws.sh @@ -112,4 +112,4 @@ scp -i $identity_file $connection:$tgz_file $tmp_dir scp -i $identity_file $connection:$ish_file $tmp_dir -echo "Files in $tmp_dir" +echo "Files in: $tmp_dir" http://git-wip-us.apache.org/repos/asf/couchdb-admin/blob/462dc2bd/release/check_docs.sh ---------------------------------------------------------------------- diff --git a/release/check_docs.sh b/release/check_docs.sh index 3064a7f..1d139e2 100755 --- a/release/check_docs.sh +++ b/release/check_docs.sh @@ -135,3 +135,6 @@ done for version in $versions; do scan $version done + +echo "Files in: $tmp_dir" + http://git-wip-us.apache.org/repos/asf/couchdb-admin/blob/462dc2bd/release/generate_proposal.sh ---------------------------------------------------------------------- diff --git a/release/generate_proposal.sh b/release/generate_proposal.sh deleted file mode 100755 index 465551e..0000000 --- a/release/generate_proposal.sh +++ /dev/null @@ -1,107 +0,0 @@ -#!/bin/sh -e - -# Licensed under the Apache License, Version 2.0 (the "License"); you may not -# use this file except in compliance with the License. You may obtain a copy of -# the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations under -# the License. - -# This script is for use by committers. -# -# It should be used in accordance with the project release procedure. -# -# cf. http://wiki.apache.org/couchdb/Release_Procedure - -GIT_URL=https://git-wip-us.apache.org/repos/asf?p=couchdb.git;a=blob_plain; - -EMAIL_TPL=email/discuss_release.txt - -if test -n "$1"; then - cache_dir=$1 -else - echo "error: no cache directory" - exit 1 -fi - -if test -n "$2"; then - branch=$2 -else - echo "error: no branch" - exit 1 -fi - -if test -n "$3"; then - version=$3 -else - echo "error: no version" - exit 1 -fi - -log () { - printf "\033[1;31m$1\033[0m\n" -} - -cd `dirname $0` - -basename=`basename $0` - -tmp_dir=`mktemp -d /tmp/$basename.XXXXXX` || exit 1 - -log "Parsing documentation..." - -email_in_file=$tmp_dir/email.txt.in - -cat $EMAIL_TPL > $email_in_file - -python <<EOF -def get_section(doc_path, version): - doc_file = open(doc_path) - copy = False - section = "" - for line in doc_file.readlines(): - if line.startswith("Version"): - if line == "Version $version\n": - copy = True - continue - else: - if copy: - break - if line.startswith("-"): - continue - if copy: - if line.strip(): - section += line - return section.rstrip() - -news = get_section("$cache_dir/branch/$branch/NEWS", "$version") - -email_in_file = open("$email_in_file") - -email_in_file_content = email_in_file.read() - -email_in_file_content = email_in_file_content.replace("%NEWS%", news) - -email_in_file = open("$email_in_file", "w") - -email_in_file.write(email_in_file_content) -EOF - -email_file=$tmp_dir/email.txt - -changes=$GIT_URL"f=CHANGES;hb=$branch" - -sed -e "s|%VERSION%|$version|g" \ - -e "s|%CHANGES%|$changes|g" \ - < $email_in_file > $email_file - -echo "Email text written to:" $email_file - -echo "Send the email to: [email protected]" - -echo "Files in $tmp_dir" http://git-wip-us.apache.org/repos/asf/couchdb-admin/blob/462dc2bd/release/publish_candidate.sh ---------------------------------------------------------------------- diff --git a/release/publish_candidate.sh b/release/publish_candidate.sh index ba0d7fb..f996f4a 100755 --- a/release/publish_candidate.sh +++ b/release/publish_candidate.sh @@ -18,7 +18,7 @@ # # cf. http://wiki.apache.org/couchdb/Release_Procedure -EMAIL_TPL=email/vote_release.txt +EMAIL_TPL=../email/vote_release.txt if test -n "$1"; then candidate_dir=$1 @@ -66,6 +66,8 @@ TMP_DIR=$tmp_dir SVN_DIR=\$(TMP_DIR)/svn +SVN_DOT_DIR=\$(TMP_DIR)/.svn + EMAIL_TPL=$EMAIL_TPL EMAIL_FILE=\$(TMP_DIR)/email.txt @@ -90,17 +92,19 @@ COMMIT_MSG_FILES="Add \$(VERSION) rc.\$(CANDIDATE) files" GPG=gpg --armor --detach-sig \$(GPG_ARGS) +SVN=svn --config-dir \$(SVN_DOT_DIR) --no-auth-cache + all: checkin checkin: sign - cd \$(SVN_DIR) && svn add \$(SVN_TGZ_FILE) - cd \$(SVN_DIR) && svn add \$(SVN_TGZ_FILE).asc - cd \$(SVN_DIR) && svn add \$(SVN_TGZ_FILE).ish - cd \$(SVN_DIR) && svn add \$(SVN_TGZ_FILE).md5 - cd \$(SVN_DIR) && svn add \$(SVN_TGZ_FILE).sha - cd \$(SVN_DIR) && svn status + cd \$(SVN_DIR) && \$(SVN) add \$(SVN_TGZ_FILE) + cd \$(SVN_DIR) && \$(SVN) add \$(SVN_TGZ_FILE).asc + cd \$(SVN_DIR) && \$(SVN) add \$(SVN_TGZ_FILE).ish + cd \$(SVN_DIR) && \$(SVN) add \$(SVN_TGZ_FILE).md5 + cd \$(SVN_DIR) && \$(SVN) add \$(SVN_TGZ_FILE).sha + cd \$(SVN_DIR) && \$(SVN) status sleep 10 - cd \$(SVN_DIR) && svn ci -m \$(COMMIT_MSG_FILES) + cd \$(SVN_DIR) && \$(SVN) ci -m \$(COMMIT_MSG_FILES) sign: copy \$(GPG) < \$(SVN_TGZ_FILE) > \$(SVN_TGZ_FILE).asc @@ -115,13 +119,15 @@ check: \$(SVN_DIR) test -s \$(CANDIDATE_TGZ_FILE) test -s \$(CANDIDATE_TGZ_FILE).ish -\$(SVN_DIR): - svn mkdir --parents \$(CANDIDATE_URL) -m \$(COMMIT_MSG_DIR) +\$(SVN_DIR): \$(SVN_DOT_DIR) + \$(SVN) mkdir --parents \$(CANDIDATE_URL) -m \$(COMMIT_MSG_DIR) sleep 10 - svn co \$(CANDIDATE_URL) \$@ + \$(SVN) co \$(CANDIDATE_URL) \$@ + +\$(SVN_DOT_DIR): + mkdir \$@ email: \$(EMAIL_FILE) - cat \$(EMAIL_FILE) \$(EMAIL_FILE): \$(EMAIL_TPL) sed -e "s|%VERSION%|\$(VERSION)|g" \ @@ -145,4 +151,4 @@ echo "Email text written to:" $email_file echo "Send the email to: [email protected]" -echo "Files in $tmp_dir" +echo "Files in: $tmp_dir"
