7045ff71b0
At various stages we want to update lots of deliverables. This acts as a tool to consolidate what we mean to supplement the docs and etherpad Story: 2005707 Task: 31033 Change-Id: Ied1f6d06a33baf3d3ef3d789bbe5c7f70d967d62
98 lines
2.8 KiB
Bash
Executable File
98 lines
2.8 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
#
|
|
# Wrapper script to locate run pre-defined queries and if needed create new releases
|
|
#
|
|
# All Rights Reserved.
|
|
#
|
|
# 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.
|
|
|
|
set -e
|
|
|
|
function usage {
|
|
echo "Usage: make_missing_releases.sh <series> <stage>"
|
|
echo
|
|
echo "Valid valules for stage are:"
|
|
echo " cwi-m) Used at the m{1,2,3} to run 'interactive release on"
|
|
echo " cycle-with-intermediary libraries"
|
|
echo
|
|
echo "Wrapper script to locate run pre-defined queries and if "\
|
|
"needed create new releases"
|
|
}
|
|
|
|
# Run a command but echo it first, kind of a light-weight set -x but avoids opencoding things
|
|
# and there for glogic errors
|
|
function v_run {
|
|
echo "$*"
|
|
"$@"
|
|
}
|
|
|
|
if [ $# -lt 2 ]; then
|
|
usage
|
|
exit 2
|
|
fi
|
|
|
|
# FIXME(tonyb): We *almost* have this in 'functions' update enable_tox_venv()
|
|
# and use that everywhere
|
|
if [[ -z "$VIRTUAL_ENV" ]]; then
|
|
if [[ ! -d .tox/venv ]]; then
|
|
tox -e venv --notest
|
|
fi
|
|
source ./.tox/venv/bin/activate
|
|
fi
|
|
|
|
stable_branch=''
|
|
interactive=''
|
|
series=$1
|
|
|
|
case "$2" in
|
|
# Used at the m{1,2,3} to run 'interactive release on
|
|
# cycle-with-intermediary libraries
|
|
cwi-m)
|
|
interactive='--interactive'
|
|
release_type='feature'
|
|
sieve='--model=cycle-with-intermediary --type=library'
|
|
;;
|
|
# m3)
|
|
# stable_branch='' # TODO: Should we create stable branches from these releases?
|
|
# release_type='feature' # TODO: Do we always want this to be a feature?
|
|
# sieve='--type=client-library'
|
|
# ;;
|
|
# rc)
|
|
# stable_branch='--stable-branch'
|
|
# release_type='rc'
|
|
# sieve='--model=cycle-with-rc'
|
|
# ;;
|
|
# final_check)
|
|
# stable_branch='--stable-branch'
|
|
# release_type='feature'
|
|
# sieve='--model=cycle-with-intermediary'
|
|
# ;;
|
|
*)
|
|
usage
|
|
exit 2
|
|
;;
|
|
esac
|
|
|
|
echo "Collecting deliverables for ${series}: ${sieve}"
|
|
declare -a deliverables=($(list-deliverables ${sieve} --unreleased --series ${series}))
|
|
processed=1
|
|
for deliverable in ${deliverables[@]} ; do
|
|
if [ -n "$interactive" ] ; then
|
|
clear
|
|
echo $(( ${#deliverables[@]} - $processed )) deliverables to go after this one
|
|
processed=$(( $processed + 1 ))
|
|
fi
|
|
|
|
v_run new-release $interactive $stable_branch $series $deliverable $release_type
|
|
done
|