You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@usergrid.apache.org by sn...@apache.org on 2016/02/05 20:26:40 UTC

usergrid git commit: Starting mods to release script to handle binary release.

Repository: usergrid
Updated Branches:
  refs/heads/release 318beb1b9 -> 2c648363a


Starting mods to release script to handle binary release.


Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/2c648363
Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/2c648363
Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/2c648363

Branch: refs/heads/release
Commit: 2c648363af9768abc5d6eb6b62d3bb885ec4fddf
Parents: 318beb1
Author: Dave Johnson <sn...@apache.org>
Authored: Fri Feb 5 11:26:38 2016 -0800
Committer: Dave Johnson <sn...@apache.org>
Committed: Fri Feb 5 11:26:38 2016 -0800

----------------------------------------------------------------------
 release/release-candidate.sh | 27 +++++++++++----------
 release/release.sh           | 49 +++++++++++++++++++++++++++++++++++----
 2 files changed, 58 insertions(+), 18 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/usergrid/blob/2c648363/release/release-candidate.sh
----------------------------------------------------------------------
diff --git a/release/release-candidate.sh b/release/release-candidate.sh
index 3cd5e81..969ac83 100755
--- a/release/release-candidate.sh
+++ b/release/release-candidate.sh
@@ -38,7 +38,7 @@ usergrid_git_web_url='https://git-wip-us.apache.org/repos/asf?p=usergrid.git'
 usergrid_svn_dist_url='https://dist.apache.org/repos/dist/dev/usergrid'
 
 
-#--------------------------------------------------------------------------------------
+#----------------------------------------------------------------------------------
 # Process command line arguments
 
 function print_help_and_exit {
@@ -93,7 +93,7 @@ if [[ "${1:-dry-run}" == "publish" ]]; then
 fi
 
 
-#--------------------------------------------------------------------------------------
+#----------------------------------------------------------------------------------
 # Make sure repo is latest and clean
 
 # Update local repository
@@ -118,7 +118,7 @@ if [[ "$base_dir" != "$PWD" ]]; then
 fi
 
 
-#--------------------------------------------------------------------------------------
+#----------------------------------------------------------------------------------
 # Calculate the new version string
 
 current_version=$(cat .usergridversion | tr '[a-z]' '[A-Z]')
@@ -147,7 +147,7 @@ else
 fi
 
 
-#--------------------------------------------------------------------------------------
+#----------------------------------------------------------------------------------
 # Add the rc tag to the current version
 
 current_version_tag="${current_version}-rc${rc_tag_version}"
@@ -171,7 +171,7 @@ EOF
 }
 
 
-#--------------------------------------------------------------------------------------
+#----------------------------------------------------------------------------------
 # Make sure repo is clean, then branch
 
 # If anything goes wrong from here then print roll back instructions before exiting.
@@ -193,7 +193,7 @@ echo "Creating ${current_version_tag} branch"
 git branch $current_version_tag $(git rev-parse HEAD)
 
 
-#--------------------------------------------------------------------------------------
+#----------------------------------------------------------------------------------
 # Build the source distribution from the new branch
 
 echo "Checking out ${current_version_tag} branch and updating .usergridversion"
@@ -211,7 +211,7 @@ mkdir -p ${dist_dir}
 git archive --prefix=${dist_name}/ -o ${dist_dir}/${dist_name}.tar.gz HEAD
 
 
-#--------------------------------------------------------------------------------------
+#----------------------------------------------------------------------------------
 # Create the binary release
 
 binary_name="apache-usergrid-${current_version_tag}-binary"
@@ -222,8 +222,7 @@ cp target/${binary_name}.tar.gz ${dist_dir}
 popd 
 
 
-
-#--------------------------------------------------------------------------------------
+#----------------------------------------------------------------------------------
 # Sign the tarballs
 
 cd ${dist_dir}
@@ -242,7 +241,7 @@ shasum ${dist_name}.tar.gz > ${dist_name}.tar.gz.sha
 shasum ${binary_name}.tar.gz > ${binary_name}.tar.gz.sha
 
 
-#--------------------------------------------------------------------------------------
+#----------------------------------------------------------------------------------
 # Publish release candidate to svn and commit and push the new git branch
 
 if [[ $publish == 1 ]]; then
@@ -266,8 +265,8 @@ cd ${base_dir}
 current_commit_id=`git rev-parse HEAD`
 
 
-#--------------------------------------------------------------------------------------
-# Create the email template for the release candidate to be sent to the mailing lists.
+#----------------------------------------------------------------------------------
+# Create the email for the release candidate to be sent to the mailing lists.
 
 echo "Done creating the release candidate. The following draft email has been created"
 echo "to send to the dev@usergrid.apache.org mailing list"
@@ -325,11 +324,11 @@ The vote will close on ${vote_end}
 __EOF__
 )
 
-echo "--------------------------------------------------------------------------------"
+echo "-----------------------------------------------------------------------------"
 echo
 echo "${MESSAGE}"
 echo
-echo "--------------------------------------------------------------------------------"
+echo "-----------------------------------------------------------------------------"
 echo
 
 # Print reset instructions if this was a dry-run

http://git-wip-us.apache.org/repos/asf/usergrid/blob/2c648363/release/release.sh
----------------------------------------------------------------------
diff --git a/release/release.sh b/release/release.sh
index acc3b1a..ad9984f 100755
--- a/release/release.sh
+++ b/release/release.sh
@@ -19,7 +19,6 @@
 # This script is used to publish the official release after a successful
 # vote of a release-candidate.
 
-# for the 2.1.0 release, we will release from 'release' instead of the usual 'master'
 export RELEASE_BRANCH=release
 
 set -e
@@ -30,6 +29,10 @@ usergrid_git_web_url='https://git-wip-us.apache.org/repos/asf?p=usergrid.git'
 usergrid_svn_dist_url='https://dist.apache.org/repos/dist/release/usergrid'
 usergrid_svn_dev_dist_url='https://dist.apache.org/repos/dist/dev/usergrid'
 
+
+#---------------------------------------------------------------------------------
+# Process command line arguments
+
 function print_help_and_exit {
 cat <<EOF
 Apache Usergrid release tool.
@@ -68,6 +71,10 @@ if [[ "${1:-dry-run}" == "publish" ]]; then
   publish=1
 fi
 
+
+#----------------------------------------------------------------------------------
+# Make sure we have signing key and repo is latest and clean
+
 # Update local repository
 git fetch --all -q
 git fetch --tags -q
@@ -104,6 +111,10 @@ if [[ "$base_dir" != "$PWD" ]]; then
   cd $base_dir
 fi
 
+
+#----------------------------------------------------------------------------------
+# Calculate the new version string
+
 # Make sure that this is not on a snapshot release
 tagged_version=$(cat .usergridversion | tr '[a-z]' '[A-Z]')
 current_version=$tagged_version
@@ -129,13 +140,20 @@ if [[ $publish == 0 ]]; then
   echo "Performing dry-run"
 fi
 
+
+#----------------------------------------------------------------------------------
 # Create a branch for the release and update the .usergridversion and tag it
+
 echo "Creating release branch and tag for ${current_version}"
 git checkout -b $current_version
 echo $current_version > .usergridversion
 git add .usergridversion
 git commit -m "Updating .usergridversion to ${current_version}."
 
+
+# TODO: ensure that the tag has the same date as the last commit made
+# in the release branch
+
 git tag -s "${current_version}" -m "usergrid-${current_version} release." $current_version
 
 #if [[ $publish == 1 ]]; then
@@ -143,6 +161,10 @@ git tag -s "${current_version}" -m "usergrid-${current_version} release." $curre
   #git push origin --tags
 #fi
 
+
+#----------------------------------------------------------------------------------
+# Build the source distribution from the new branch
+
 dist_name="apache-usergrid-${current_version}"
 
 dist_dir=${base_dir}/dist
@@ -157,21 +179,40 @@ cd $dist_dir
 #  svn co --depth=empty ${usergrid_svn_dist_url}/${current_version} ${release_dir}
 #fi
 
-# Now that the .usergridversion has been updated to the release version build the release source dist from it
+# Now that the .usergridversion has been updated to the release version build 
+# the release source dist from it
 cd $base_dir
 git archive --prefix=${dist_name}/ -o ${release_dir}/${dist_name}.tar.gz HEAD
 
+
+#----------------------------------------------------------------------------------
+# Build the binary distribution from the new branch
+
+binary_name="apache-usergrid-${current_version_tag}-binary"
+
+pushd release
+./binary-release.sh ${current_version_tag}
+cp target/${binary_name}.tar.gz ${dist_dir}
+popd 
+
+
+#----------------------------------------------------------------------------------
+# Sign the tarballs
+
 cd ${release_dir}
-# Sign the tarball.
+
 echo "Signing the distribution"
 gpg --armor --output ${release_dir}/${dist_name}.tar.gz.asc --detach-sig ${release_dir}/${dist_name}.tar.gz
 
-# Create the checksums
 echo "Creating checksums"
+
 # md5
 gpg --print-md MD5 ${dist_name}.tar.gz > ${dist_name}.tar.gz.md5
+gpg --print-md MD5 ${binary_name}.tar.gz > ${binary_name}.tar.gz.md5
+
 # sha
 shasum ${dist_name}.tar.gz > ${dist_name}.tar.gz.sha
+shasum ${binary_name}.tar.gz > ${binary_name}.tar.gz.sha
 
 #if [[ $publish == 1 ]]; then
   # Commit the release