diff --git a/tools/announce.sh b/tools/announce.sh index 8ceb256aa4..7b005ac396 100755 --- a/tools/announce.sh +++ b/tools/announce.sh @@ -160,7 +160,8 @@ if [[ $FIRST_FULL = "yes" ]]; then fi # Set up email tags for the project owner. -PROJECT_OWNER=${PROJECT_OWNER:-$(get-repo-owner --email-tag $REPOORGNAME/$SHORTNAME || echo "")} +PROJECT_OWNER=${PROJECT_OWNER:-$(get-repo-owner \ + --email-tag $REPOORGNAME/$SHORTNAME || echo "")} if [[ "$PROJECT_OWNER" != "" ]]; then email_tags="--email-tags ${PROJECT_OWNER}" fi diff --git a/tools/build_reenqueue_commands.sh b/tools/build_reenqueue_commands.sh index 5718cd9e34..178a53ad68 100755 --- a/tools/build_reenqueue_commands.sh +++ b/tools/build_reenqueue_commands.sh @@ -33,5 +33,7 @@ else fi for pipeline in $pipelines; do - echo "zuul enqueue-ref --tenant=openstack --trigger=gerrit --pipeline=$pipeline --project=$repo --ref=refs/tags/$tag --newrev=$hash" + echo "zuul enqueue-ref --tenant=openstack --trigger=gerrit \ + --pipeline=$pipeline --project=$repo --ref=refs/tags/$tag \ + --newrev=$hash" done diff --git a/tools/clone_repo.sh b/tools/clone_repo.sh index 1c30cd3344..89f7dd977d 100755 --- a/tools/clone_repo.sh +++ b/tools/clone_repo.sh @@ -71,7 +71,8 @@ REF="" UPSTREAM="git://git.openstack.org" if [[ $(uname) != "Darwin" ]]; then - OPTS=`getopt -o hv --long branch:,cache-dir:,ref:,upstream:,workspace: -n $0 -- "$@"` + OPTS=`getopt -o hv --long branch:,cache-dir:,ref:,upstream:,workspace: \ + -n $0 -- "$@"` if [ $? != 0 ] ; then echo "Failed parsing options." >&2 print_help diff --git a/tools/inactive_project_report.sh b/tools/inactive_project_report.sh index 473387b299..45b05bac3c 100755 --- a/tools/inactive_project_report.sh +++ b/tools/inactive_project_report.sh @@ -17,14 +17,16 @@ fi setup_temp_space inactive-project-report # Figure out the current series from the releases directory. -current_series=$(python -c 'import openstack_releases.defaults; print(openstack_releases.defaults.RELEASE)') +current_series=$(python -c 'import openstack_releases.defaults; \ + print(openstack_releases.defaults.RELEASE)') if [ -z "$current_series" ]; then echo "Could not determine the current release series." exit 1 fi # Figure out the previous series from the releases directory. -previous_series=$(ls $BASEDIR/deliverables | grep -B1 $current_series | head -n 1) +previous_series=$(ls $BASEDIR/deliverables | grep -B1 $current_series \ + | head -n 1) if [ -z "$previous_series" ]; then echo "Could not determine the previous release series." exit 1 @@ -40,7 +42,8 @@ for deliv in $deliverables; do echo list-deliverables --deliverable "$deliv" -v - repos=$(list-deliverables --deliverable "$deliv" --repos --series "$previous_series") + repos=$(list-deliverables --deliverable "$deliv" --repos \ + --series "$previous_series") for repo in $repos; do title "$repo" diff --git a/tools/list_changes_unreleased_deliverables.sh b/tools/list_changes_unreleased_deliverables.sh index a199f75414..d2e819d3bb 100755 --- a/tools/list_changes_unreleased_deliverables.sh +++ b/tools/list_changes_unreleased_deliverables.sh @@ -15,14 +15,16 @@ if [[ -z "$VIRTUAL_ENV" ]]; then fi # Figure out the current series from the releases directory. -current_series=$(python -c 'import openstack_releases.defaults; print(openstack_releases.defaults.RELEASE)') +current_series=$(python -c 'import openstack_releases.defaults; \ + print(openstack_releases.defaults.RELEASE)') if [ -z "$current_series" ]; then echo "Could not determine the current release series." exit 1 fi # Figure out the previous series from the releases directory. -previous_series=$(ls $BASEDIR/deliverables | grep -B1 $current_series | head -n 1) +previous_series=$(ls $BASEDIR/deliverables | grep -B1 $current_series \ + | head -n 1) if [ -z "$previous_series" ]; then echo "Could not determine the previous release series." exit 1 @@ -43,15 +45,17 @@ function show_deliv { # Show the changes for each repo for the deliverable, as defined # by the previous series releases. - repos=$(list-deliverables --deliverable "$deliv" --repos --series "$previous_series") + repos=$(list-deliverables --deliverable "$deliv" --repos \ + --series "$previous_series") $TOOLSDIR/list_unreleased_changes.sh master $repos } for deliv in $deliverables; do - owner=$(echo $(grep team $BASEDIR/deliverables/$current_series/${deliv}.yaml \ - | cut -f2 -d:) \ - | sed -e 's/ /-/g') + owner=$(echo \ + $(grep team $BASEDIR/deliverables/$current_series/${deliv}.yaml \ + | cut -f2 -d:) \ + | sed -e 's/ /-/g') if [[ -z "$owner" ]]; then echo "ERROR: No owner for $deliv" continue diff --git a/tools/list_library_unreleased_changes.sh b/tools/list_library_unreleased_changes.sh index 4c995a95b1..f7e756407c 100755 --- a/tools/list_library_unreleased_changes.sh +++ b/tools/list_library_unreleased_changes.sh @@ -32,6 +32,7 @@ if [[ -z "$VIRTUAL_ENV" ]]; then fi echo "Finding $SERIES library repositories..." -repos=$(list-deliverables --repos --type library --type client-library --series $SERIES) +repos=$(list-deliverables --repos --type library --type client-library \ + --series $SERIES) $TOOLSDIR/list_unreleased_changes.sh $BRANCH $repos diff --git a/tools/list_stable_unreleased_changes.sh b/tools/list_stable_unreleased_changes.sh index 9bd1547805..4676340cea 100755 --- a/tools/list_stable_unreleased_changes.sh +++ b/tools/list_stable_unreleased_changes.sh @@ -27,6 +27,7 @@ if [[ -z "$VIRTUAL_ENV" ]]; then source $BASEDIR/.tox/venv/bin/activate fi -repos="$(list-deliverables --repos --tag stable:follows-policy --series $SERIES)" +repos="$(list-deliverables --repos --tag stable:follows-policy \ + --series $SERIES)" $TOOLSDIR/list_unreleased_changes.sh stable/$SERIES $repos diff --git a/tools/list_unreleased_changes.sh b/tools/list_unreleased_changes.sh index 5202147acd..534b335826 100755 --- a/tools/list_unreleased_changes.sh +++ b/tools/list_unreleased_changes.sh @@ -45,10 +45,11 @@ function list_changes { echo "$repo has not yet been released" else echo - local end_sha=$(git log -n 1 --pretty=tformat:%h) + end_sha=$(git log -n 1 --pretty=tformat:%h) echo "Changes between $prev_tag and $end_sha" echo - git log --no-color --no-merges --format='%h %ci %s' --graph ${prev_tag}..${end_sha} + git log --no-color --no-merges --format='%h %ci %s' \ + --graph ${prev_tag}..${end_sha} echo fi } diff --git a/tools/series_diff_start.sh b/tools/series_diff_start.sh index 22fb1564f8..4638887101 100755 --- a/tools/series_diff_start.sh +++ b/tools/series_diff_start.sh @@ -32,7 +32,7 @@ END="$1" shift REPOS="$@" -function get_branch_end() { +function get_branch_end { local branch="$1" if git tag | grep -q ${branch}-eol; then @@ -43,9 +43,9 @@ function get_branch_end() { fi } -function get_branch_base() { +function get_branch_base { local branch="$1" - local scan_start="$(get_branch_end $branch)" + scan_start="$(get_branch_end $branch)" git log --decorate --oneline ..${scan_start} \ | grep tag: \ @@ -54,15 +54,15 @@ function get_branch_base() { | cut -f1 -d')' } -function count_lines() { +function count_lines { git ls-files | xargs wc -l | tail -n 1 | awk '{print $1}' } -function count_files() { +function count_files { git ls-files | wc -l } -function git_ls_tree() { +function git_ls_tree { local tag="$1" local extension="$2" @@ -73,7 +73,7 @@ function git_ls_tree() { fi } -function shas_at_tag() { +function shas_at_tag { # Produce a list of shas used by objects representing files with # real content at the tag point local tag="$1" @@ -92,7 +92,7 @@ function shas_at_tag() { done } -function count_unchanged_files() { +function count_unchanged_files { local start="$1" local end="$2" local extension="$3"