brooklyn-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From henev...@apache.org
Subject [03/11] brooklyn-dist git commit: delete old scripts no longer relevant (and not maintained, i don't think)
Date Mon, 08 Feb 2016 11:07:43 GMT
delete old scripts no longer relevant (and not maintained, i don't think)


Project: http://git-wip-us.apache.org/repos/asf/brooklyn-dist/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-dist/commit/3fb5160b
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-dist/tree/3fb5160b
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-dist/diff/3fb5160b

Branch: refs/heads/master
Commit: 3fb5160bbee518d7467a517ec5b1e4c8bfc50063
Parents: 0929c2d
Author: Alex Heneveld <alex.heneveld@cloudsoftcorp.com>
Authored: Wed Feb 3 10:10:23 2016 +0000
Committer: Alex Heneveld <alex.heneveld@cloudsoftcorp.com>
Committed: Wed Feb 3 10:10:23 2016 +0000

----------------------------------------------------------------------
 scripts/buildAndTest               | 102 ----------------------------
 scripts/release-branch-from-master | 114 --------------------------------
 scripts/release-make               |  83 -----------------------
 3 files changed, 299 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/brooklyn-dist/blob/3fb5160b/scripts/buildAndTest
----------------------------------------------------------------------
diff --git a/scripts/buildAndTest b/scripts/buildAndTest
deleted file mode 100755
index 45c1a26..0000000
--- a/scripts/buildAndTest
+++ /dev/null
@@ -1,102 +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.
-#
-# Convenience script to clean, build, install and run unit and/or integration tests.
-# Recommend you run this prior to pushing to Github to reduce the chances of breaking
-# the continuous integration (unit tests) or overnight builds (integration tests.)
-#
-# Also very useful when using "git bisect" to find out which commit was responsible
-# for breaking the overnight build - invoke as "git bisect run ./buildAndRun"
-#
-# Run "./buildAndRun --help" to see the usage.
-#
-
-# Has an integration test left a Java process running? See if there is any running
-# Java processes and offer to kill them/
-cleanup(){
-    PROCS=$(ps ax | grep '[j]ava' | grep -v set_tab_title)
-    if [ ! -z "${PROCS}" ]; then
-	echo "These Java processes are running:"
-	echo ${PROCS}
-	echo -n "Kill them? y=yes, n=no, x=abort: "
-	read $RESPONSE
-	[ "${RESPONSE}" = "y" ] && killall java && sleep 1s
-	[ "${RESPONSE}" = "x" ] && exit 50
-    fi
-}
-
-# Check a return value, and bail if its non-zero - invoke as "assert $? 'Unit tests'"
-assert(){
-    [ $1 -eq 0 ] && return
-    echo '*** Command returned '$1' on '$2
-    exit $1
-}
-
-# The defaults
-unit=1
-integration=1
-
-if [ ! -z "$1" ]; then
-    case "$1" in
-	u)
-	    unit=1
-	    integration=0
-	    ;;
-	i)
-	    unit=0
-	    integration=1
-	    ;;
-	ui)
-	    unit=1
-	    integration=1
-	    ;;
-	b)
-	    unit=0
-	    integration=0
-	    ;;
-	*)
-	    echo >&2 Usage: buildAndTest [action]
-	    echo >&2 where action is:
-	    echo >&2 u - build from clean and run unit tests
-	    echo >&2 i - build from clean and run integration tests
-	    echo >&2 ui - build from clean and run unit and integration tests \(default\)
-	    echo >&2 b - build from clean and do not run any tests
-	    exit 1
-	    ;;
-    esac
-fi
-
-echo '*** BUILD'
-mvn clean install -DskipTests -PConsole
-assert $? 'BUILD'
-cleanup
-if [ $unit -eq 1 ]; then
-    echo '*** UNIT TEST'
-    mvn integration-test -PConsole
-    assert $? 'UNIT TEST'
-    cleanup
-fi
-if [ $integration -eq 1 ]; then
-    echo '*** INTEGRATION TEST'
-    mvn integration-test -PConsole,Integration
-    assert $? 'INTEGRATION TEST'
-    cleanup
-fi
-
-exit 0

http://git-wip-us.apache.org/repos/asf/brooklyn-dist/blob/3fb5160b/scripts/release-branch-from-master
----------------------------------------------------------------------
diff --git a/scripts/release-branch-from-master b/scripts/release-branch-from-master
deleted file mode 100755
index 8d7befa..0000000
--- a/scripts/release-branch-from-master
+++ /dev/null
@@ -1,114 +0,0 @@
-#!/bin/bash -e
-#
-# 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.
-#
-
-usage(){
-	echo >&2 'Usage: release-branch-from-master --release <version> [ --release-suffix
<suffix> ]'
-	echo >&2 '                                  --master <version>  [ --master-suffix
<suffix> ]'
-	echo >&2 'Creates a release branch, and updates the version number in both the branch
and master.'
-	echo >&2 '<version> should be a two-part version number, such as 3.6 or 4.0.'
-	echo >&2 '<suffix> will normally be of the form ".patchlevel", plus "-RC1"
or similar if required,'
-	echo >&2 'plus "-SNAPSHOT". Example: ".0.RC1-SNAPSHOT". The defaults for the suffix
are normally sensible.'
-	echo >&2 'This command will preview what it is going to do and require confirmation
before it makes changes.'
-}
-
-release_ver=
-release_ver_suffix=.0-RC1-SNAPSHOT
-master_ver=
-master_ver_suffix=.0-SNAPSHOT
-
-[ $# -eq 0 ] && echo >&2 "No arguments given, so I'm going to try and figure
it out myself. Invoke with the --help option if you want to find how to invoke this script."
-
-while [ $# -gt 0 ]; do
-	case $1 in
-		--release)			shift; release_ver=$1;;
-		--release-suffix)	shift; release_ver_suffix=$1;;
-		--master)			shift; master_ver=$1;;
-		--master-suffix)	shift; master_ver_suffix=$1;;
-		*)					usage; exit 1;;
-	esac
-	shift
-done
-
-# Use xpath to query the current version number in the pom
-xpath='xpath'
-type -P $xpath &>/dev/null && {
-	set +e
-	current_version=$( xpath pom.xml '/project/version/text()' 2>/dev/null )
-	( echo ${current_version} | grep -qE '^([0-9]+).([0-9]+).0-SNAPSHOT$' )
-	current_version_valid=$?
-	set -e 
-} || { 
-	echo "Cannot guess version number as $xpath command not found."
-	current_version_valid=1
-}
-
-if [ "${current_version_valid}" -ne 0 -a -z "${release_ver}" -a -z "${master_ver}" ]; then
-	echo >&2 "Detected current version as '${current_version}', but I can't parse this.
Please supply --release and --master parameters."
-	exit 1
-fi
-
-[ -z "${release_ver}" ] && {
-	release_ver=${current_version%-SNAPSHOT}
-	release_ver=${release_ver%.0}
-	[ -z "${release_ver}" ] && { echo >&2 Could not determine the version of
the release branch. Please use the --release parameter. ; exit 1 ; }
-}
-
-[ -z "${master_ver}" ] && {
-	master_ver=$( echo ${current_version} | perl -n -e 'if (/^(\d+).(\d+)(.*)$/) { printf "%s.%s\n",
$1, $2+1 }' )
-	[ -z "${master_ver}" ] && { echo >&2 Could not determine the version of the
master branch. Please use the --master parameter. ; exit 1 ; }
-}
-
-version_on_branch=${release_ver}${release_ver_suffix}
-version_on_master=${master_ver}${master_ver_suffix}
-branch_name=${version_on_branch}
-
-# Show the details and get confirmation
-echo "The current version is:                                  ${current_version}"
-echo "The release branch will be named:                        ${branch_name}"
-echo "The version number on the release branch will be set to: ${version_on_branch}"
-echo "The version number on 'master' will be set to:           ${version_on_master}"
-echo "If you proceed, the new branch and version number changes will be pushed to GitHub."
-echo -n 'Enter "y" if this is correct, anything else to abort: '
-read input
-[ "$input" == "y" ] || { echo >&2 Aborted. ; exit 1 ; }
-
-# Fail if not in a Git repository
-[ -d .git ] || {
-	echo >&2 Error: this directory is not a git repository root. Nothing happened.
-	exit 1
-}
-
-# Warn if the current branch isn't master
-current_branch=$( git name-rev --name-only HEAD )
-[ ${current_branch} == "master" ] || {
-	echo Current branch is ${current_branch}. Usually, release branches are made from master.
-	echo -n 'Enter "y" if this is correct, anything else to abort: '
-	read input
-	[ "$input" == "y" ] || { echo >&2 Aborted. ; exit 1 ; }
-}
-
-# Get Maven to make the branch
-set -x
-mvn release:clean release:branch -P Brooklyn,Console,Example,Launcher,Acceptance,Documentation
--batch-mode -DautoVersionSubmodules=true -DbranchName=${branch_name} -DupdateBranchVersions=true
-DreleaseVersion=${version_on_branch} -DdevelopmentVersion=${version_on_master}
-set +x
-
-# Done!
-echo Completed. Your repository is still looking at ${current_branch}. To switch to the release
branch, enter:
-echo git checkout ${branch_name}

http://git-wip-us.apache.org/repos/asf/brooklyn-dist/blob/3fb5160b/scripts/release-make
----------------------------------------------------------------------
diff --git a/scripts/release-make b/scripts/release-make
deleted file mode 100755
index df46ea1..0000000
--- a/scripts/release-make
+++ /dev/null
@@ -1,83 +0,0 @@
-#!/bin/bash -e -u
-#
-# 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.
-#
-
-usage(){
-	echo >&2 'Usage: release-make [ --release <version> ] [ --next <version>
]'
-	echo >&2 'Creates and tags a release based on the current branch.'
-	echo >&2 'Arguments are optional - if omitted, the script tries to work out the correct
versions.'
-	echo >&2 'release <version> should be a full version number, such as 3.6.0-RC1'
-	echo >&2 'next <version> should be a snapshot version number, such as 3.6.0-RC2-SNAPSHOT'
-	echo >&2 'This command will preview what it is going to do and require confirmation
before it makes changes.'
-}
-
-[ $# -eq 0 ] && echo >&2 "No arguments given, so I'm going to try and figure
it out myself. Invoke with the --help option if you want to find how to invoke this script."
-
-release_tag_ver=
-release_branch_ver=
-
-while [ $# -gt 0 ]; do
-	case $1 in
-		--release)	shift; release_tag_ver=$1;;
-		--next)		shift; release_branch_ver=$1;;
-		*)					usage; exit 1;;
-	esac
-	shift
-done
-
-# Some magic to derive the anticipated version of the release.
-# Use xpath to query the version number in the pom
-xpath='xpath'
-type -P $xpath &>/dev/null && {
-	set +e
-	current_version=$( xpath pom.xml '/project/version/text()' 2>/dev/null )
-	set -e
-} || {
-        echo "Cannot guess version number as $xpath command not found."
-}
-# If the user didn't supply the release version, strip -SNAPSHOT off the current version
and use that
-[ -z "$release_tag_ver" ] && release_tag_ver=${current_version%-SNAPSHOT}
-
-# More magic, this time to guess the next version.
-# If the user didn't supply the next version, modify the digits off the end of the release
to increment by one and append -SNAPSHOT
-[ -z "$release_branch_ver" ] && release_branch_ver=$( echo ${release_tag_ver} | perl
-n -e 'if (/^(.*)(\d+)$/) { print $1.($2+1)."-SNAPSHOT\n" }' )
-
-current_branch=$( git name-rev --name-only HEAD )
-
-echo "The release is on the branch:                             ${current_branch}"
-echo "The current version (detected) is:                        ${current_version}"
-echo "The release version is:                                   ${release_tag_ver}"
-echo "Development on the release branch continues with version: ${release_branch_ver}"
-echo -n 'Enter "y" if this is correct, anything else to abort: '
-read input
-[ "$input" == "y" ] || { echo >&2 Aborted. ; exit 1 ; }
-
-# Warn if the current branch is master
-[ ${current_branch} == "master" ] && {
-	echo Current branch is ${current_branch}. Usually, releases are made from a release branch.
-	echo -n 'Enter "y" if this is correct, anything else to abort: '
-	read input
-	[ "$input" == "y" ] || { echo >&2 Aborted. ; exit 1 ; }
-}
-
-# Release prepare
-mvn release:clean release:prepare -PExample,Launcher,Four,Three --batch-mode -DautoVersionSubmodules=true
-DreleaseVersion=${release_tag_ver} -DdevelopmentVersion=${release_branch_ver}
-
-# Release perform
-mvn release:perform -PExample,Launcher,Four,Three --batch-mode


Mime
View raw message