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 2014/11/21 09:39:12 UTC

[01/15] incubator-usergrid git commit: version number for testing release script

Repository: incubator-usergrid
Updated Branches:
  refs/heads/master 7d4ba7fc2 -> 373890609


version number for testing release script


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

Branch: refs/heads/master
Commit: 711ae9203d2d25d9fe4277089aa8f2b4ea85d24f
Parents: 7d4ba7f
Author: Dave Johnson <dm...@apigee.com>
Authored: Wed Nov 19 13:35:02 2014 +0100
Committer: Dave Johnson <dm...@apigee.com>
Committed: Wed Nov 19 13:35:02 2014 +0100

----------------------------------------------------------------------
 release/.usergridversion | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/711ae920/release/.usergridversion
----------------------------------------------------------------------
diff --git a/release/.usergridversion b/release/.usergridversion
new file mode 100644
index 0000000..7dea76e
--- /dev/null
+++ b/release/.usergridversion
@@ -0,0 +1 @@
+1.0.1


[10/15] incubator-usergrid git commit: Replace aurora with usergrid.

Posted by sn...@apache.org.
Replace aurora with usergrid.


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

Branch: refs/heads/master
Commit: a7228670e22d454968c979ab1214adca1241ddbb
Parents: 9e5977e
Author: Dave Johnson <dm...@apigee.com>
Authored: Thu Nov 20 10:27:30 2014 +0100
Committer: Dave Johnson <dm...@apigee.com>
Committed: Thu Nov 20 10:27:30 2014 +0100

----------------------------------------------------------------------
 release/release-candidate.sh | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a7228670/release/release-candidate.sh
----------------------------------------------------------------------
diff --git a/release/release-candidate.sh b/release/release-candidate.sh
old mode 100644
new mode 100755
index 37b8db6..913c2eb
--- a/release/release-candidate.sh
+++ b/release/release-candidate.sh
@@ -27,8 +27,8 @@ set -o errexit
 set -o nounset
 
 rc_tag_version=0
-usergrid_git_web_url='https://git-wip-us.apache.org/repos/asf?p=incubator-aurora.git'
-usergrid_svn_dist_url='https://dist.apache.org/repos/dist/dev/incubator/aurora'
+usergrid_git_web_url='https://git-wip-us.apache.org/repos/asf?p=incubator-usergrid.git'
+usergrid_svn_dist_url='https://dist.apache.org/repos/dist/dev/incubator/usergrid'
 
 function print_help_and_exit {
 cat <<EOF
@@ -205,7 +205,7 @@ shasum ${dist_name}.tar.gz > ${dist_name}.tar.gz.sha
 # Publish release candidate to svn and commit and push the new git branch
 if [[ $publish == 1 ]]; then
   echo "Publishing release candidate to ${usergrid_svn_dist_url}/${current_version_tag}"
-  svn mkdir ${usergrid_svn_dist_url}/${current_version_tag} -m "aurora-${current_version} release candidate ${rc_tag_version}"
+  svn mkdir ${usergrid_svn_dist_url}/${current_version_tag} -m "usergrid-${current_version} release candidate ${rc_tag_version}"
   svn co --depth=empty ${usergrid_svn_dist_url}/${current_version_tag} ${dist_dir}
   svn add ${dist_name}*
   svn ci -m "usergrid-${current_version} release candidate ${rc_tag_version}"


[14/15] incubator-usergrid git commit: Incrementing snapshot version to 1.0.2-SNAPSHOT.

Posted by sn...@apache.org.
Incrementing snapshot version to 1.0.2-SNAPSHOT.


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

Branch: refs/heads/master
Commit: 1d092664c78f47032f0fd4c8f65f8ccc22868c4b
Parents: 01b45d2
Author: Dave Johnson <dm...@apigee.com>
Authored: Thu Nov 20 11:05:39 2014 +0100
Committer: Dave Johnson <dm...@apigee.com>
Committed: Thu Nov 20 11:05:39 2014 +0100

----------------------------------------------------------------------
 .usergridversion | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/1d092664/.usergridversion
----------------------------------------------------------------------
diff --git a/.usergridversion b/.usergridversion
index 51f7e73..276823b 100644
--- a/.usergridversion
+++ b/.usergridversion
@@ -1 +1 @@
-1.0.1-SNAPSHOT
+1.0.2-SNAPSHOT


[02/15] incubator-usergrid git commit: version number for testing release script

Posted by sn...@apache.org.
version number for testing release script


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

Branch: refs/heads/master
Commit: 6308fc406909372861803448689c1f1c40d69a98
Parents: 711ae92
Author: Dave Johnson <dm...@apigee.com>
Authored: Wed Nov 19 13:35:48 2014 +0100
Committer: Dave Johnson <dm...@apigee.com>
Committed: Wed Nov 19 13:35:48 2014 +0100

----------------------------------------------------------------------
 release/.usergridversion | 1 -
 1 file changed, 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/6308fc40/release/.usergridversion
----------------------------------------------------------------------
diff --git a/release/.usergridversion b/release/.usergridversion
deleted file mode 100644
index 7dea76e..0000000
--- a/release/.usergridversion
+++ /dev/null
@@ -1 +0,0 @@
-1.0.1


[04/15] incubator-usergrid git commit: testing new release script

Posted by sn...@apache.org.
testing new release script


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

Branch: refs/heads/master
Commit: e444315b5c1e169a8a623fc6f6804d2e1fa1d2b6
Parents: 163ad48
Author: Dave Johnson <dm...@apigee.com>
Authored: Wed Nov 19 13:39:09 2014 +0100
Committer: Dave Johnson <dm...@apigee.com>
Committed: Wed Nov 19 13:39:09 2014 +0100

----------------------------------------------------------------------
 .usergridversion | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/e444315b/.usergridversion
----------------------------------------------------------------------
diff --git a/.usergridversion b/.usergridversion
index 7dea76e..61ea02c 100644
--- a/.usergridversion
+++ b/.usergridversion
@@ -1 +1 @@
-1.0.1
+1.0.2-release-test


[05/15] incubator-usergrid git commit: Attempt to fix apparently erroneous "ERROR: .. tag exists." error

Posted by sn...@apache.org.
Attempt to fix apparently erroneous "ERROR: .. tag exists." error


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

Branch: refs/heads/master
Commit: ff97056054f6c41f9fd827bd94123f5027ead83f
Parents: e444315
Author: Dave Johnson <dm...@apigee.com>
Authored: Wed Nov 19 13:55:04 2014 +0100
Committer: Dave Johnson <dm...@apigee.com>
Committed: Wed Nov 19 13:55:04 2014 +0100

----------------------------------------------------------------------
 release/release.sh | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/ff970560/release/release.sh
----------------------------------------------------------------------
diff --git a/release/release.sh b/release/release.sh
index e991970..5fd89ae 100755
--- a/release/release.sh
+++ b/release/release.sh
@@ -113,7 +113,7 @@ else
 fi
 
 # Make sure the tag does not exist
-if git rev-parse --tags=$current_version >/dev/null 2>&1; then
+if git rev-parse $current_version >/dev/null 2>&1; then
   echo "ERROR: ${current_version} tag exists."
   exit 1
 fi
@@ -190,9 +190,6 @@ echo
 MESSAGE=$(cat <<__EOF__
 To: dev@usergrid.incubator.apache.org
 Subject: [RESULT][VOTE] Release Apache Usergrid ${current_version} (incubating) RC#{rc_tag_version}
-
-All,
-The vote to accept Apache Usergrid ${current_version} RC#{rc_tag_version}
 as the official Apache Usegrid ${current_version} release has passed.
 
 


[12/15] incubator-usergrid git commit: Adding changelog generation.

Posted by sn...@apache.org.
Adding changelog generation.


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

Branch: refs/heads/master
Commit: 2f1614aa849052053e0ea352edf776aad2c28b10
Parents: 36e9f45
Author: Dave Johnson <dm...@apigee.com>
Authored: Thu Nov 20 11:05:00 2014 +0100
Committer: Dave Johnson <dm...@apigee.com>
Committed: Thu Nov 20 11:05:00 2014 +0100

----------------------------------------------------------------------
 release/changelog.rb         | 150 ++++++++++++++++++++++++++++++++++++++
 release/release-candidate.sh |   2 +-
 2 files changed, 151 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2f1614aa/release/changelog.rb
----------------------------------------------------------------------
diff --git a/release/changelog.rb b/release/changelog.rb
new file mode 100755
index 0000000..8e7cfcb
--- /dev/null
+++ b/release/changelog.rb
@@ -0,0 +1,150 @@
+#!/usr/bin/env ruby
+#
+# 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.
+#
+# Updates the CHANGELOG for the specified Apache Usergrid release, if no
+# version override is specified then .usergridversion will be read and used.
+# The version string will need to match the Apache Usergrid jira tickets
+# fixVersion to generate this list.
+#
+require 'rubygems'
+require 'json'
+require 'uri'
+require 'net/http'
+require 'net/https'
+require 'openssl'
+require 'tempfile'
+
+def http_post(uri, params={}, headers={}, body=nil, debug=false)
+  http = Net::HTTP.new(uri.host, uri.port)
+  http.set_debug_output($stdout) if debug
+  if uri.scheme == "https" || uri.port == 443
+    http.use_ssl = true
+    http.verify_mode = OpenSSL::SSL::VERIFY_NONE
+  end
+  response = nil
+
+  begin
+    request = Net::HTTP::Post.new(uri.request_uri)
+    request.set_form_data(params) if (params && params.size > 1)
+    request.basic_auth uri.user, uri.password if uri.user
+    request.body = body if body
+
+    headers.each_pair do |name, value|
+      request[name] = value
+    end
+
+    response = http.request(request)
+  rescue Exception => e
+    raise "Error posting to #{uri.to_s}. #{e}"
+  end
+
+  response
+end
+
+def get_jira_issues_for_query(url, jql, startAt=0, maxResults=100)
+  begin
+    request_body = { :jql => jql, :startAt => startAt, :maxResults => maxResults}
+    response = http_post(
+      URI(url),
+      {},
+      {"content-type" => 'application/json', "accept" => "application/json"},
+      request_body.to_json
+    )
+  rescue StandardError => e
+    raise "Error executing jql query: #{jql}. #{e}"
+  end
+
+  begin
+    results = JSON.parse(response.body)
+  rescue StandardError => e
+    raise "Error parsing json result"
+  end
+
+  results
+end
+
+def get_all_jira_issues_for_query(url, jql)
+  startAt = 0
+  maxResults = 100
+
+  results = []
+  begin
+    res = get_jira_issues_for_query(url, jql, startAt, maxResults)
+    results.concat(res['issues']) if res && res.has_key?('issues')
+    startAt = startAt + maxResults
+  end until (results.size() == res['total'] )
+
+  results
+end
+
+base_dir = `git rev-parse --show-toplevel`.strip
+
+# Get the current version from the .usergridversion file if no version override is provided
+version = nil
+if ARGV[0].nil?
+  version = nil
+  Dir.chdir(base_dir) do
+    version = File.read('.usergridversion').strip
+  end
+else
+  version = ARGV[0]
+end
+
+raise "Unable to read .usergridversion" if version.nil?
+
+jira_base_url = "https://issues.apache.org/jira"
+jira_search_url = "/rest/api/2/search"
+jira_url = jira_base_url + jira_search_url
+
+jql="project=AURORA AND fixVersion='#{version}' AND status in (Resolved,Closed) ORDER BY issuetype"
+
+# Fetch all the issues available for the given jql query
+results = get_all_jira_issues_for_query(jira_url, jql)
+
+changelog = {}
+# Loop through and add all results
+results.each do |issue|
+  key = issue['key']
+  summary = issue['fields']['summary']
+  type = issue['fields']['issuetype']['name']
+
+  changelog_entry = "[#{key}] - #{summary}"
+
+  if !changelog[type].nil?
+    changelog[type] << changelog_entry
+  else
+    changelog[type] = [changelog_entry]
+  end
+end
+
+# Merge the new updates and the existing changelog
+tmpfile = Tempfile.open('usergrid.changelog')
+begin
+  tmpfile.puts "Usergrid #{version}", "-" * 80
+  changelog.keys.sort.each do |type|
+    tmpfile.puts "## #{type}"
+    changelog[type].each { |entry| tmpfile.puts "    * #{entry}" }
+    tmpfile.puts ""
+  end
+  # Append all the existing CHANGELOG entries and write the new CHANGELOG file
+  tmpfile.puts ""
+  changelog_file = File.join(base_dir, 'CHANGELOG')
+  tmpfile.write File.read(changelog_file) if File.exist?(changelog_file)
+  tmpfile.rewind
+  tmpfile.flush
+  File.open(changelog_file,"w+") {|f|  f.write(tmpfile.read) }
+ensure
+  tmpfile.close
+  tmpfile.unlink
+end

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2f1614aa/release/release-candidate.sh
----------------------------------------------------------------------
diff --git a/release/release-candidate.sh b/release/release-candidate.sh
index 913c2eb..028f3b7 100755
--- a/release/release-candidate.sh
+++ b/release/release-candidate.sh
@@ -165,7 +165,7 @@ fi
 git clean -fdxq
 
 echo "Generating changelog"
-${base_dir}/build-support/release/changelog $current_version
+${base_dir}/release/changelog.rb $current_version
 git add CHANGELOG
 git commit -m "Updating CHANGELOG for ${current_version} release."
 


[09/15] incubator-usergrid git commit: Beginning of a release candidate creating script, and removing the old release pom because the new scripts can replace it.

Posted by sn...@apache.org.
Beginning of a release candidate creating script, and removing the old release pom because the new scripts can replace it.


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

Branch: refs/heads/master
Commit: 9e5977e8ab72f5c3e5ad1406c5a224c272b9ce69
Parents: 4355483
Author: Dave Johnson <dm...@apigee.com>
Authored: Wed Nov 19 16:09:49 2014 +0100
Committer: Dave Johnson <dm...@apigee.com>
Committed: Wed Nov 19 16:09:49 2014 +0100

----------------------------------------------------------------------
 release/pom.xml                      |  65 -------
 release/release-candidate.sh         | 292 ++++++++++++++++++++++++++++++
 release/sign-release.sh              |  30 ---
 release/src/main/assembly/source.xml |  57 ------
 4 files changed, 292 insertions(+), 152 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/9e5977e8/release/pom.xml
----------------------------------------------------------------------
diff --git a/release/pom.xml b/release/pom.xml
deleted file mode 100644
index 5abea58..0000000
--- a/release/pom.xml
+++ /dev/null
@@ -1,65 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you 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.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <modelVersion>4.0.0</modelVersion>
-
-    <parent>
-        <groupId>org.apache.usergrid</groupId>
-        <artifactId>usergrid</artifactId>
-        <version>1.0.0</version>
-        <relativePath>../stack/pom.xml</relativePath>
-    </parent>
-
-    <artifactId>apache-usergrid-incubating</artifactId>
-    <packaging>pom</packaging>
-    <version>1.0.0</version>
-
-    <name>Usergrid Release Assembly</name>
-    <description>Assembles Usergrid into a distribution package</description>
-
-    <build>
-
-        <plugins>
-
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-assembly-plugin</artifactId>
-                <configuration>
-                    <descriptors>
-                        <descriptor>src/main/assembly/source.xml</descriptor>
-                    </descriptors>
-                    <tarLongFileMode>gnu</tarLongFileMode>
-                </configuration>
-                <executions>
-                    <execution>
-                        <id>make-assembly</id>
-                        <phase>package</phase>
-                        <goals>
-                            <goal>single</goal>
-                        </goals>
-                    </execution>
-                </executions>
-            </plugin>
-
-        </plugins>
-
-    </build>
-
-</project>

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/9e5977e8/release/release-candidate.sh
----------------------------------------------------------------------
diff --git a/release/release-candidate.sh b/release/release-candidate.sh
new file mode 100644
index 0000000..37b8db6
--- /dev/null
+++ b/release/release-candidate.sh
@@ -0,0 +1,292 @@
+#!/bin/bash
+#
+# 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 used to create a release candidate. It will update the current
+# .usergridversion as well as creates a branch for the new release candidate and
+# publishes the source distrobution and signatures to be voted on.
+#
+#   master~1 (0.5.0-snapshot) ----- master (0.6.0-snapshot)
+#                             \---- 0.5.0 (0.5.0)
+#
+# A email template will be generated after successfully generating a release
+# candidate which will need to be sent to the dev@ and private@ mailing lists.
+#
+set -o errexit
+set -o nounset
+
+rc_tag_version=0
+usergrid_git_web_url='https://git-wip-us.apache.org/repos/asf?p=incubator-aurora.git'
+usergrid_svn_dist_url='https://dist.apache.org/repos/dist/dev/incubator/aurora'
+
+function print_help_and_exit {
+cat <<EOF
+Apache Usergrid release candidate tool.
+
+Usage: $0 [-h] [-l p|m|M] [-r #] [-p | publish]
+
+  -h   Print this help message and exit
+  -l   Increment level, must be one of:
+       p, patch (default)
+  		 m, minor
+  		 M, major
+  -r   Release candidate number (default: 0)
+  -p   Publish the release candidate (default: dry-run, does not publish anything)
+EOF
+exit 0
+}
+
+publish=0
+increment_level="patch"
+rc_tag_version=0
+while getopts ":hl:r:p" opt; do
+  case $opt in
+    l)
+      case ${OPTARG} in
+        'p' | 'patch') increment_level='patch' ;;
+        'm' | 'minor') increment_level='minor' ;;
+        'M' | 'major') increment_level='major' ;;
+         *) echo 'Unknown increment level'; exit 1 ;;
+      esac
+      ;;
+    r)
+      rc_tag_version=${OPTARG}
+      ;;
+    p)
+      publish=1
+      ;;
+    h)
+      print_help_and_exit
+      ;;
+    *  )
+      echo "Unknown option: -$OPTARG"
+      print_help_and_exit
+      ;;
+  esac
+done
+
+shift $(($OPTIND - 1))
+if [[ "${1:-dry-run}" == "publish" ]]; then
+  publish=1
+fi
+
+# Update local repository
+git fetch --all -q
+git fetch --tags -q
+
+# Set the base dir for the script to be the top level of the repository
+base_dir=$(git rev-parse --show-toplevel)
+
+# Verify that this is a clean repository
+if [[ -n "`git status --porcelain`" ]]; then
+  echo "ERROR: Please run from a clean git repository."
+  exit 1
+elif [[ "`git rev-parse --abbrev-ref HEAD`" != "master" ]]; then
+  echo "ERROR: This script must be run from master."
+  exit 1
+fi
+
+if [[ "$base_dir" != "$PWD" ]]; then
+  echo "Warrning: This script must be run from the root of the repository ${base_dir}"
+  cd $base_dir
+fi
+
+# Calculate the new version string
+current_version=$(cat .usergridversion | tr '[a-z]' '[A-Z]')
+if ! [[ $current_version =~ .*-SNAPSHOT ]]; then
+  echo "ERROR: .usergridversion is required to contain 'SNAPSHOT', it is ${current_version}"
+  exit 1
+else
+  major=`echo $current_version | cut -d. -f1`
+  minor=`echo $current_version | cut -d. -f2`
+  patch=`echo $current_version | cut -d. -f3 | cut -d- -f1`
+
+  current_version="${major}.${minor}.${patch}"
+
+  if [[ $increment_level == "patch" ]]; then
+    new_master_version="${major}.${minor}.$((patch + 1))"
+  elif [[ $increment_level == "minor" ]]; then
+    new_master_version="${major}.$((minor + 1)).0"
+  elif [[ $increment_level == "major" ]]; then
+    new_master_version="$((major + 1)).0.0"
+  else
+    echo "Unknown release increment ${increment_level}"
+    exit 1
+  fi
+
+  new_snapshot_version="${new_master_version}-SNAPSHOT"
+fi
+
+# Add the rc tag to the current version
+current_version_tag="${current_version}-rc${rc_tag_version}"
+
+# Make sure the branch does not exist
+if git rev-parse $current_version_tag >/dev/null 2>&1; then
+  echo "ERROR: ${current_version_tag} exists."
+  exit 1
+fi
+
+# Reset instructions
+current_git_rev=$(git rev-parse HEAD)
+function print_reset_instructions {
+cat <<EOF
+To roll back your local repo you will need to run:
+
+  git checkout master
+  git reset --hard ${current_git_rev}
+  git branch -D ${current_version_tag}
+EOF
+}
+
+# If anything goes wrong from here then print roll back instructions before exiting.
+function print_rollback_instructions {
+  echo "ERROR: Looks like something has failed while creating the release candidate."
+  print_reset_instructions
+}
+trap print_rollback_instructions EXIT
+
+# All check are now complete, before we start alert if we are in dry-run
+if [[ $publish == 0 ]]; then
+  echo "Performing dry-run"
+fi
+
+# This should be a clean repo we are working against. Run clean just to ensure it is.
+git clean -fdxq
+
+echo "Generating changelog"
+${base_dir}/build-support/release/changelog $current_version
+git add CHANGELOG
+git commit -m "Updating CHANGELOG for ${current_version} release."
+
+echo "Creating ${current_version_tag} branch"
+git branch $current_version_tag $(git rev-parse HEAD)
+
+echo "Committing updated .usergridversion on master"
+echo $new_snapshot_version > .usergridversion
+git add .usergridversion
+git commit -m "Incrementing snapshot version to ${new_snapshot_version}."
+
+# Build the source distribution from the new branch
+echo "Checking out ${current_version_tag} branch and updating .usergridversion"
+git checkout $current_version_tag
+# Increment the version and create a branch
+echo $current_version_tag > .usergridversion
+git add .usergridversion
+git commit -m "Updating .usergridversion to ${current_version_tag}."
+
+echo "Building the source distribution"
+dist_dir=${base_dir}/dist
+dist_name="apache-usergrid-${current_version_tag}-incubating"
+
+mkdir -p ${dist_dir}
+git archive --prefix=${dist_name}/ -o ${dist_dir}/${dist_name}.tar.gz HEAD
+
+cd ${dist_dir}
+# Sign the tarball.
+echo "Signing the distribution"
+gpg --armor --output ${dist_dir}/${dist_name}.tar.gz.asc --detach-sig ${dist_dir}/${dist_name}.tar.gz
+
+# Create the checksums
+echo "Creating checksums"
+gpg --print-md MD5 ${dist_name}.tar.gz > ${dist_name}.tar.gz.md5
+shasum ${dist_name}.tar.gz > ${dist_name}.tar.gz.sha
+
+# Publish release candidate to svn and commit and push the new git branch
+if [[ $publish == 1 ]]; then
+  echo "Publishing release candidate to ${usergrid_svn_dist_url}/${current_version_tag}"
+  svn mkdir ${usergrid_svn_dist_url}/${current_version_tag} -m "aurora-${current_version} release candidate ${rc_tag_version}"
+  svn co --depth=empty ${usergrid_svn_dist_url}/${current_version_tag} ${dist_dir}
+  svn add ${dist_name}*
+  svn ci -m "usergrid-${current_version} release candidate ${rc_tag_version}"
+
+  echo "Pushing new branch ${current_version_tag} to origin"
+  cd ${base_dir}
+  git push origin ${current_version_tag}
+  echo "Pushing updated .usergridversion to master"
+  git checkout master
+  git push origin master
+fi
+
+cd ${base_dir}
+
+echo "Done creating the release candidate. The following draft email has been created"
+echo "to send to the dev@usergrid.incubator.apache.org mailing list"
+echo
+
+# Create the email template for the release candidate to be sent to the mailing lists.
+if [[ $(uname) == Darwin ]]; then
+  vote_end=$(date -v+3d)
+else
+  vote_end=$(date -d+3days)
+fi
+
+MESSAGE=$(cat <<__EOF__
+To: dev@usergrid.incubator.apache.org
+Subject: [VOTE] Release Apache Usergrid ${current_version} (incubating) RC${rc_tag_version}
+
+All,
+
+I propose that we accept the following release candidate as the official
+Apache Usergrid ${current_version} release.
+
+
+Usergrid ${current_version_tag} includes the following:
+---
+The CHANGELOG for the release is available at:
+${usergrid_git_web_url}&f=CHANGELOG&hb=${current_version_tag}
+
+The branch used to create the release candidate is:
+${usergrid_git_web_url}&hb=${current_version_tag}
+
+The release candidate is available at:
+${usergrid_svn_dist_url}/${current_version_tag}/${dist_name}.tar.gz
+
+The MD5 checksum of the release candidate can be found at:
+${usergrid_svn_dist_url}/${current_version_tag}/${dist_name}.tar.gz.md5
+
+The signature of the release candidate can be found at:
+${usergrid_svn_dist_url}/${current_version_tag}/${dist_name}.tar.gz.asc
+
+The GPG key used to sign the release are available at:
+${usergrid_svn_dist_url}/KEYS
+
+Please download, verify, and test.
+
+The vote will close on ${vote_end}
+
+[ ] +1 Release this as Apache Usergrid ${current_version}
+[ ] +0
+[ ] -1 Do not release this as Apache Usergrid ${current_version} because...
+
+__EOF__
+)
+
+echo "--------------------------------------------------------------------------------"
+echo
+echo "${MESSAGE}"
+echo
+echo "--------------------------------------------------------------------------------"
+echo
+
+# Print reset instructions if this was a dry-run
+if [[ $publish == 0 ]]; then
+  echo
+  echo "This was a dry run, nothing has been published."
+  echo
+  print_reset_instructions
+fi
+
+# Unset error message handler and exit
+trap '' EXIT
+exit 0

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/9e5977e8/release/sign-release.sh
----------------------------------------------------------------------
diff --git a/release/sign-release.sh b/release/sign-release.sh
deleted file mode 100755
index 766a0d5..0000000
--- a/release/sign-release.sh
+++ /dev/null
@@ -1,30 +0,0 @@
-#!/bin/bash
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You 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.
-#
-
-pushd target 
-
-export rcstring=""
-export vstring="1.0.0"
-
-gpg --armor --detach-sig apache-usergrid-incubating-${vstring}${rcstring}-source.zip
-gpg --armor --detach-sig apache-usergrid-incubating-${vstring}${rcstring}-source.tar.gz
-
-gpg --print-md MD5 apache-usergrid-incubating-${vstring}${rcstring}-source.zip > apache-usergrid-incubating-${vstring}${rcstring}-source.zip.md5
-gpg --print-md MD5 apache-usergrid-incubating-${vstring}${rcstring}-source.tar.gz > apache-usergrid-incubating-${vstring}${rcstring}-source.tar.gz.md5
-
-popd

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/9e5977e8/release/src/main/assembly/source.xml
----------------------------------------------------------------------
diff --git a/release/src/main/assembly/source.xml b/release/src/main/assembly/source.xml
deleted file mode 100644
index d462985..0000000
--- a/release/src/main/assembly/source.xml
+++ /dev/null
@@ -1,57 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you 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.
--->
-<assembly>
-	<id>source</id>
-	<formats>
-		<format>tar.gz</format>
-		<format>zip</format>
-	</formats>
-	<includeBaseDirectory>false</includeBaseDirectory>
-	<fileSets>
-		<fileSet>
-			<outputDirectory>apache-usergrid-incubating-${pom.version}</outputDirectory>
-			<directory>${project.basedir}/../</directory>
-			<includes>
-				<include>**</include>
-			</includes>
-			<excludes>
-				<exclude>**/target/**</exclude>
-				<exclude>**/**.log</exclude>
-				<exclude>**/.idea/**</exclude>
-				<exclude>**/._*</exclude>
-				<exclude>**/._*/**</exclude>
-				<exclude>**/.repository/**</exclude>
-				<exclude>**/.classpath</exclude>
-				<exclude>**/.project</exclude>
-				<exclude>**/.settings/**</exclude>
-				<exclude>**/bower_compoments/**</exclude>
-				<exclude>**/node_modules/**</exclude>
-				<exclude>**/dist/**</exclude>
-				<exclude>**/dist_cov/**</exclude>
-				<exclude>**/portal/index.html</exclude>
-				<exclude>**/portal/index-debug.html</exclude>
-				<exclude>**/*.nupkg</exclude>
-				<exclude>**/*.dll</exclude>
-			</excludes>
-		</fileSet>
-	</fileSets>
-</assembly>
-
-


[08/15] incubator-usergrid git commit: Attempt to exclude files from "git archive" operation.

Posted by sn...@apache.org.
Attempt to exclude files from "git archive" operation.


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

Branch: refs/heads/master
Commit: 4355483481bc6ff638e7b8b573cd12eb0f8c6253
Parents: 75bbf2b
Author: Dave Johnson <dm...@apigee.com>
Authored: Wed Nov 19 14:34:09 2014 +0100
Committer: Dave Johnson <dm...@apigee.com>
Committed: Wed Nov 19 14:34:09 2014 +0100

----------------------------------------------------------------------
 .gitattributes | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/43554834/.gitattributes
----------------------------------------------------------------------
diff --git a/.gitattributes b/.gitattributes
new file mode 100644
index 0000000..af4450f
--- /dev/null
+++ b/.gitattributes
@@ -0,0 +1,17 @@
+target/ export-ignore
+*.log export-ignore
+.idea/ export-ignore
+._* export-ignore
+._*/ export-ignore
+.repository/ export-ignore
+.classpath export-ignore
+.project export-ignore
+.settings/ export-ignore
+bower_compoments/ export-ignore
+node_modules/ export-ignore
+dist/ export-ignore
+dist_cov/ export-ignore
+portal/index.html</> export-ignore
+portal/index-debug.html export-ignore
+*.nupkg export-ignore
+*.dll export-ignore


[03/15] incubator-usergrid git commit: version number for testing release script

Posted by sn...@apache.org.
version number for testing release script


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

Branch: refs/heads/master
Commit: 163ad48889bf8cd0b7cc55ff459018fb521bbbf4
Parents: 6308fc4
Author: Dave Johnson <dm...@apigee.com>
Authored: Wed Nov 19 13:36:27 2014 +0100
Committer: Dave Johnson <dm...@apigee.com>
Committed: Wed Nov 19 13:36:27 2014 +0100

----------------------------------------------------------------------
 .usergridversion | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/163ad488/.usergridversion
----------------------------------------------------------------------
diff --git a/.usergridversion b/.usergridversion
new file mode 100644
index 0000000..7dea76e
--- /dev/null
+++ b/.usergridversion
@@ -0,0 +1 @@
+1.0.1


[07/15] incubator-usergrid git commit: comment out deletion of release candidate branches because of error: line 177: syntax error near unexpected token `git'

Posted by sn...@apache.org.
comment out deletion of release candidate branches because of error: line 177: syntax error near unexpected token `git'


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

Branch: refs/heads/master
Commit: 75bbf2b866918d43663c87ed2495efd0950f064c
Parents: 5d2c2e1
Author: Dave Johnson <dm...@apigee.com>
Authored: Wed Nov 19 14:16:52 2014 +0100
Committer: Dave Johnson <dm...@apigee.com>
Committed: Wed Nov 19 14:16:52 2014 +0100

----------------------------------------------------------------------
 release/release.sh | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/75bbf2b8/release/release.sh
----------------------------------------------------------------------
diff --git a/release/release.sh b/release/release.sh
index 14d4cb4..ef8e0c5 100755
--- a/release/release.sh
+++ b/release/release.sh
@@ -173,11 +173,11 @@ if [[ $publish == 1 ]]; then
   svn ci -m "usergrid-${current_version} release"
 
   # Finally delete all release candidate branches
-  for ref in $(git for-each-ref --format='%(refname:short)' 'refs/heads/${current_version}-rc*') do
-    git branch -D ${ref}
-    git push origin --delete ${ref}
-    svn rm ${usergrid_svn_dev_dist_url}/${ref}
-  done
+#  for ref in $(git for-each-ref --format='%(refname:short)' 'refs/heads/${current_version}-rc*') do
+#    git branch -D ${ref} # line 177: syntax error near unexpected token `git'
+#    git push origin --delete ${ref}
+#    svn rm ${usergrid_svn_dev_dist_url}/${ref}
+#  done
 fi
 
 cd ${base_dir}


[11/15] incubator-usergrid git commit: testing new release candidate script.

Posted by sn...@apache.org.
testing new release candidate script.


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

Branch: refs/heads/master
Commit: 36e9f45ac02ed96971487020b6be8989a8f9df85
Parents: a722867
Author: Dave Johnson <dm...@apigee.com>
Authored: Thu Nov 20 10:38:36 2014 +0100
Committer: Dave Johnson <dm...@apigee.com>
Committed: Thu Nov 20 10:38:36 2014 +0100

----------------------------------------------------------------------
 .usergridversion | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/36e9f45a/.usergridversion
----------------------------------------------------------------------
diff --git a/.usergridversion b/.usergridversion
index 61ea02c..51f7e73 100644
--- a/.usergridversion
+++ b/.usergridversion
@@ -1 +1 @@
-1.0.2-release-test
+1.0.1-SNAPSHOT


[15/15] incubator-usergrid git commit: Adding some instructions.

Posted by sn...@apache.org.
Adding some instructions.


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

Branch: refs/heads/master
Commit: 373890609833a332002c4fe9cd18cf4c2761ebf5
Parents: 1d09266
Author: Dave Johnson <dm...@apigee.com>
Authored: Thu Nov 20 11:15:09 2014 +0100
Committer: Dave Johnson <dm...@apigee.com>
Committed: Thu Nov 20 11:15:09 2014 +0100

----------------------------------------------------------------------
 README.txt | 37 +++++++++++++++++++++++++++++++++++++
 1 file changed, 37 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/37389060/README.txt
----------------------------------------------------------------------
diff --git a/README.txt b/README.txt
new file mode 100644
index 0000000..0f81a02
--- /dev/null
+++ b/README.txt
@@ -0,0 +1,37 @@
+
+This directory contains scripts for generating the files and emails needed to 
+create a Usegrid release and a release-candidate, and for publishing the 
+release to the proper location for release and mirroring. The scripts are 
+based on scripts from the Apache Aurora project.
+
+These are the important files:
+
+  /.usergridversion       - version number to be used for release
+  /.gitattributes         - lists file patterns that are to be exlcuded
+  /release/release-candidate.sh - create a release candidate
+  /release/release.sh     - create a release
+  /release/changelog.rb   - generate CHANGELOG based on JIRA fixVerison 
+
+To create a release candidate:
+
+1) Change to the master branch. Set .usergridversion to release version number.
+
+2) Make sure that all JIRA issues that you want in the CHANGELOG have fixVersion
+   that matches the release version number in .usergridversion
+
+3) Ensure that everything is committed, branch must be clean
+
+4) From the project root directory run release/release-candidate.sh
+
+
+To create a release:
+
+1) Change to the release branch. Set .usergridversion to release version number.
+
+2) Make sure that all JIRA issues that you want in the CHANGELOG have fixVersion
+   that matches the release version number in .usergridversion
+
+3) Ensure that everything is committed, branch must be clean
+
+4) From the project root directory run release/release.sh
+


[13/15] incubator-usergrid git commit: Updating CHANGELOG for 1.0.1 release.

Posted by sn...@apache.org.
Updating CHANGELOG for 1.0.1 release.


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

Branch: refs/heads/master
Commit: 01b45d23017b92dba6300828f84d44712295d438
Parents: 2f1614a
Author: Dave Johnson <dm...@apigee.com>
Authored: Thu Nov 20 11:05:39 2014 +0100
Committer: Dave Johnson <dm...@apigee.com>
Committed: Thu Nov 20 11:05:39 2014 +0100

----------------------------------------------------------------------
 CHANGELOG | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/01b45d23/CHANGELOG
----------------------------------------------------------------------
diff --git a/CHANGELOG b/CHANGELOG
new file mode 100644
index 0000000..49e5d1c
--- /dev/null
+++ b/CHANGELOG
@@ -0,0 +1,3 @@
+Usergrid 1.0.1
+--------------------------------------------------------------------------------
+


[06/15] incubator-usergrid git commit: Use correct variable name current_version, not current_version_tag

Posted by sn...@apache.org.
Use correct variable name current_version, not current_version_tag


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

Branch: refs/heads/master
Commit: 5d2c2e1f4dbed752dc28a3736af863ca3487870f
Parents: ff97056
Author: Dave Johnson <dm...@apigee.com>
Authored: Wed Nov 19 14:00:05 2014 +0100
Committer: Dave Johnson <dm...@apigee.com>
Committed: Wed Nov 19 14:00:05 2014 +0100

----------------------------------------------------------------------
 release/release.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/5d2c2e1f/release/release.sh
----------------------------------------------------------------------
diff --git a/release/release.sh b/release/release.sh
index 5fd89ae..14d4cb4 100755
--- a/release/release.sh
+++ b/release/release.sh
@@ -126,7 +126,7 @@ 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_tag > .usergridversion
+echo $current_version > .usergridversion
 git add .usergridversion
 git commit -m "Updating .usergridversion to ${current_version}."