couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nsla...@apache.org
Subject git commit: Add tag_candidate.sh and fix up other files
Date Fri, 08 Mar 2013 01:30:53 GMT
Updated Branches:
  refs/heads/master 462dc2bda -> c718864a6


Add tag_candidate.sh and fix up other files


Project: http://git-wip-us.apache.org/repos/asf/couchdb-admin/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-admin/commit/c718864a
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-admin/tree/c718864a
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-admin/diff/c718864a

Branch: refs/heads/master
Commit: c718864a62a743f83d5ce0a412b54af73ad1dc05
Parents: 462dc2b
Author: Noah Slater <nslater@apache.org>
Authored: Fri Mar 8 01:30:36 2013 +0000
Committer: Noah Slater <nslater@apache.org>
Committed: Fri Mar 8 01:30:36 2013 +0000

----------------------------------------------------------------------
 release/build_candidate.sh   |   43 ++++++-------
 release/publish_candidate.sh |   37 +++++------
 release/tag_candidate.sh     |  132 +++++++++++++++++++++++++++++++++++++
 3 files changed, 168 insertions(+), 44 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-admin/blob/c718864a/release/build_candidate.sh
----------------------------------------------------------------------
diff --git a/release/build_candidate.sh b/release/build_candidate.sh
index a56aff6..d2184d0 100755
--- a/release/build_candidate.sh
+++ b/release/build_candidate.sh
@@ -82,11 +82,11 @@ EOF
 build_file=$tmp_dir/build.mk
 
 cat > $build_file <<EOF
-URL=https://git-wip-us.apache.org/repos/asf/couchdb.git
+GIR_URL=https://git-wip-us.apache.org/repos/asf/couchdb.git
 
 TMP_DIR=$tmp_dir
 
-SRC_DIR=\$(TMP_DIR)/git
+GIT_DIR=\$(TMP_DIR)/git
 
 DIFF_FILE=$diff_file
 
@@ -96,30 +96,27 @@ VERSION=$version
 
 PACKAGE=apache-couchdb-\$(VERSION)
 
-SRC_FILE=\$(SRC_DIR)/\$(PACKAGE).tar.gz
+GIT_FILE=\$(GIT_DIR)/\$(PACKAGE).tar.gz
 
-TGZ_FILE=\$(TMP_DIR)/\$(PACKAGE).tar.gz
+TMP_FILE=\$(TMP_DIR)/\$(PACKAGE).tar.gz
 
 all: \$(TMP_DIR)/\$(PACKAGE).tar.gz
 
-\$(TMP_DIR)/\$(PACKAGE).tar.gz: \$(TGZ_FILE).ish
-	cd \$(SRC_DIR) && \
+\$(TMP_FILE): \$(TMP_FILE).ish
+	cd \$(GIT_DIR) && \
 	    ./bootstrap
-	cd \$(SRC_DIR) && \
+	cd \$(GIT_DIR) && \
 	    ./configure --enable-strictness --disable-tests
-	cd \$(SRC_DIR) && \
+	cd \$(GIT_DIR) && \
 	    DISTCHECK_CONFIGURE_FLAGS="--disable-tests" make -j distcheck
-	mv \$(SRC_FILE) \$(TGZ_FILE)
+	mv \$(GIT_FILE) \$(TMP_FILE)
 
-\$(TGZ_FILE).ish: \$(SRC_DIR)
-	cd \$(SRC_DIR) && git show HEAD | head -n 1 | cut -d " " -f 2 > \$@
+\$(TMP_FILE).ish: \$(GIT_DIR)
+	cd \$(GIT_DIR) && git show HEAD | head -n 1 | cut -d " " -f 2 > \$@
 
-\$(SRC_DIR): \$(TMP_DIR)
-	git clone \$(URL) \$@
-	cd \$(SRC_DIR) && git checkout -b \$(BRANCH) origin/\$(BRANCH)
-
-\$(TMP_DIR):
-	mkdir \$@
+\$(GIT_DIR):
+	git clone \$(GIR_URL) \$@
+	cd \$(GIT_DIR) && git checkout -b \$(BRANCH) origin/\$(BRANCH)
 
 check: check-files
 
@@ -134,18 +131,18 @@ check-files: check-diff
 	    grep `date +%Y` share/doc/src/conf.py
 
 check-diff: check-file-size
-	cd \$(SRC_DIR) && git archive \
+	cd \$(GIT_DIR) && git archive \
 	    --prefix=\$(BRANCH)/ -o ../\$(BRANCH).tar \
-	    \`cat \$(TGZ_FILE).ish\`
+	    \`cat \$(TMP_FILE).ish\`
 	cd \$(TMP_DIR) && tar -xf \$(TMP_DIR)/\$(BRANCH).tar
-	cd \$(TMP_DIR) && tar -xzf \$(TGZ_FILE)
+	cd \$(TMP_DIR) && tar -xzf \$(TMP_FILE)
 	diff -r \$(TMP_DIR)/\$(PACKAGE) \$(TMP_DIR)/\$(BRANCH) \
 	    | grep --include= -vEf \$(DIFF_FILE); \
-	test "\$\$?" -eq 1
+	    test "\$\$?" -eq 1
 
 check-file-size:
-	test -s \$(TGZ_FILE)
-	test -s \$(TGZ_FILE).ish
+	test -s \$(TMP_FILE)
+	test -s \$(TMP_FILE).ish
 EOF
 
 log_file=$tmp_dir/log.txt

http://git-wip-us.apache.org/repos/asf/couchdb-admin/blob/c718864a/release/publish_candidate.sh
----------------------------------------------------------------------
diff --git a/release/publish_candidate.sh b/release/publish_candidate.sh
index f996f4a..4ac837a 100755
--- a/release/publish_candidate.sh
+++ b/release/publish_candidate.sh
@@ -55,19 +55,17 @@ tmp_dir=`mktemp -d /tmp/$basename.XXXXXX` || exit 1
 
 echo $tmp_dir
 
-build_file=build.mk
+build_file=$tmp_dir/build.mk
 
 cat > $build_file <<EOF
 # SVN_URL=https://dist.apache.org/repos/dist/dev/couchdb
 
-SVN_URL=https://svn.apache.org/repos/asf/couchdb/site/test
+SVN_URL=https://svn.apache.org/repos/asf/couchdb/site/test/dev
 
 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
@@ -76,19 +74,19 @@ VERSION=$version
 
 CANDIDATE=$candidate
 
+PACKAGE=apache-couchdb-\$(VERSION)
+
 CANDIDATE_DIR=$candidate_dir
 
 CANDIDATE_URL=\$(SVN_URL)/source/\$(VERSION)/rc.\$(CANDIDATE)
 
-PACKAGE=apache-couchdb-\$(VERSION)
-
 CANDIDATE_TGZ_FILE=\$(CANDIDATE_DIR)/\$(PACKAGE).tar.gz
 
 SVN_TGZ_FILE=\$(SVN_DIR)/\$(PACKAGE).tar.gz
 
-COMMIT_MSG_DIR="Add \$(VERSION) rc.\$(CANDIDATE) dir"
+COMMIT_MSG_DIR="Add \$(VERSION)-rc.\$(CANDIDATE) dir"
 
-COMMIT_MSG_FILES="Add \$(VERSION) rc.\$(CANDIDATE) files"
+COMMIT_MSG_FILES="Add \$(VERSION)-rc.\$(CANDIDATE) files"
 
 GPG=gpg --armor --detach-sig \$(GPG_ARGS)
 
@@ -97,14 +95,14 @@ 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
@@ -120,12 +118,9 @@ check: \$(SVN_DIR)
 	test -s \$(CANDIDATE_TGZ_FILE).ish
 
 \$(SVN_DIR): \$(SVN_DOT_DIR)
-	\$(SVN) mkdir --parents \$(CANDIDATE_URL) -m \$(COMMIT_MSG_DIR)
+	svn mkdir --parents \$(CANDIDATE_URL) -m \$(COMMIT_MSG_DIR)
 	sleep 10
-	\$(SVN) co \$(CANDIDATE_URL) \$@
-
-\$(SVN_DOT_DIR):
-	mkdir \$@
+	svn co \$(CANDIDATE_URL) \$@
 
 email: \$(EMAIL_FILE)
 
@@ -137,7 +132,7 @@ email: \$(EMAIL_FILE)
 	    \$@ < \$<
 EOF
 
-log "Checking candidate into Subversion..."
+log "Adding candidate to the release dist directory..."
 
 make -f $build_file
 

http://git-wip-us.apache.org/repos/asf/couchdb-admin/blob/c718864a/release/tag_candidate.sh
----------------------------------------------------------------------
diff --git a/release/tag_candidate.sh b/release/tag_candidate.sh
new file mode 100755
index 0000000..99f2f0e
--- /dev/null
+++ b/release/tag_candidate.sh
@@ -0,0 +1,132 @@
+#!/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
+
+if test -n "$1"; then
+    version=$1
+else
+	echo "error: no version"
+    exit
+fi
+
+if test -n "$2"; then
+    candidate=$2
+else
+	echo "error: no candidate number"
+    exit
+fi
+
+if test -n "$3"; then
+    gpg_key=$3
+else
+	echo "error: no GPG key"
+    exit
+fi
+
+log () {
+    printf "\033[1;31m$1\033[0m\n"
+}
+
+cd `dirname $0`
+
+basename=`basename $0`
+
+log "Creating temporary directory..."
+
+tmp_dir=`mktemp -d /tmp/$basename.XXXXXX` || exit 1
+
+echo $tmp_dir
+
+build_file=$tmp_dir/build.mk
+
+cat > $build_file <<EOF
+GIR_URL=https://git-wip-us.apache.org/repos/asf/couchdb.git
+
+# SVN_DEV_URL=https://dist.apache.org/repos/dist/dev/couchdb
+
+# SVN_RELEASE_URL=https://dist.apache.org/repos/dist/release/couchdb
+
+SVN_DEV_URL=https://svn.apache.org/repos/asf/couchdb/site/test/dev
+
+SVN_RELEASE_URL=https://svn.apache.org/repos/asf/couchdb/site/test/release
+
+TMP_DIR=$tmp_dir
+
+GIT_DIR=\$(TMP_DIR)/git
+
+RC_FILE=\$(TMP_DIR)/rc.txt
+
+ISH_FILE=\$(TMP_DIR)/ish.txt
+
+VERSION=$version
+
+CANDIDATE=$candidate
+
+GPG_KEY=$gpg_key
+
+PACKAGE=apache-couchdb-\$(VERSION)
+
+VERSION_DEV_URL=\$(SVN_DEV_URL)/source/\$(VERSION)
+
+VERSION_RELEASE_URL=\$(SVN_RELEASE_URL)/source/\$(VERSION)
+
+CANDIDATE_DEV_URL=\$(VERSION_DEV_URL)/rc.\$(CANDIDATE)
+
+CANDIDATE_ISH_DEV_URL=\$(CANDIDATE_DEV_URL)/\$(PACKAGE).tar.gz.ish
+
+COMMIT_MSG_TAG="Apache CouchDB \$(VERSION)"
+
+COMMIT_MSG_DIR="Release Apache CouchDB \$(VERSION)"
+
+all:
+
+release:
+	svn cp \$(CANDIDATE_DEV_URL) \$(VERSION_RELEASE_URL) \
+	    -m \$(COMMIT_MSG_DIR)
+	echo "Release dist directory: \$(VERSION_RELEASE_URL)"
+
+tag: \$(GIT_DIR)
+	echo git tag -u \$(GPG_KEY) \$(VERSION) \
+	    \`cat \$(ISH_FILE)\` -m \$(COMMIT_MSG_TAG)
+	echo git push origin \$(VERSION)
+
+\$(GIT_DIR): check
+	git clone \$(GIR_URL) \$@
+
+check: \$(ISH_FILE)
+	test "\`cat \$(RC_FILE)\`" = "rc.\$(CANDIDATE)/"
+	svn info \$(VERSION_RELEASE_URL) > /dev/null 2>&1; \
+	    test "\$\$?" -eq 1
+
+\$(ISH_FILE): \$(RC_FILE)
+	svn cat \$(CANDIDATE_ISH_DEV_URL) > \$@
+
+\$(RC_FILE): \$(SVN_DOT_DIR)
+	svn ls \$(VERSION_DEV_URL) | sort -r | head -n 1 > \$@
+EOF
+
+log "Tagging candidate..."
+
+make -f $build_file tag
+
+log "Copying candidate to the release dist directory..."
+
+make -f $build_file release
+
+echo "Files in: $tmp_dir"


Mime
View raw message