You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by ad...@apache.org on 2021/09/01 14:36:16 UTC

[cassandra] 01/01: Merge branch 'cassandra-3.11' into cassandra-4.0

This is an automated email from the ASF dual-hosted git repository.

adelapena pushed a commit to branch cassandra-4.0
in repository https://gitbox.apache.org/repos/asf/cassandra.git

commit b5e138646b7c67c6942c1be979c76ebba01c2cfa
Merge: c36c081 595596e
Author: Andrés de la Peña <a....@gmail.com>
AuthorDate: Wed Sep 1 15:32:40 2021 +0100

    Merge branch 'cassandra-3.11' into cassandra-4.0

 .circleci/generate.sh | 95 ++++++++++++++++++++++++++++++++++++++++-----------
 .circleci/readme.md   | 46 ++++++++++++++++++-------
 2 files changed, 110 insertions(+), 31 deletions(-)

diff --cc .circleci/generate.sh
index 1effbb7,db7d772..3b5ea50
--- a/.circleci/generate.sh
+++ b/.circleci/generate.sh
@@@ -19,22 -19,80 +19,79 @@@
  
  BASEDIR=`dirname $0`
  
- # setup lowres
- circleci config process $BASEDIR/config-2_1.yml > $BASEDIR/config.yml.LOWRES.tmp
- cat $BASEDIR/license.yml $BASEDIR/config.yml.LOWRES.tmp > $BASEDIR/config.yml.LOWRES
- rm $BASEDIR/config.yml.LOWRES.tmp
- 
- # setup midres
- patch -o $BASEDIR/config-2_1.yml.MIDRES $BASEDIR/config-2_1.yml $BASEDIR/config-2_1.yml.mid_res.patch
- circleci config process $BASEDIR/config-2_1.yml.MIDRES > $BASEDIR/config.yml.MIDRES.tmp
- cat $BASEDIR/license.yml $BASEDIR/config.yml.MIDRES.tmp > $BASEDIR/config.yml.MIDRES
- rm $BASEDIR/config-2_1.yml.MIDRES $BASEDIR/config.yml.MIDRES.tmp
- 
- # setup higher
- patch -o $BASEDIR/config-2_1.yml.HIGHRES $BASEDIR/config-2_1.yml $BASEDIR/config-2_1.yml.high_res.patch
- circleci config process $BASEDIR/config-2_1.yml.HIGHRES > $BASEDIR/config.yml.HIGHRES.tmp
- cat $BASEDIR/license.yml $BASEDIR/config.yml.HIGHRES.tmp > $BASEDIR/config.yml.HIGHRES
- rm $BASEDIR/config-2_1.yml.HIGHRES $BASEDIR/config.yml.HIGHRES.tmp
- 
- # copy lower into config.yml to make sure this gets updated
- cp $BASEDIR/config.yml.LOWRES $BASEDIR/config.yml
+ die ()
+ {
+   echo "ERROR: $*"
+   echo "Usage: $0 [-l|-m|-h]"
+   echo "   -l Generate config.yml using low resources"
+   echo "   -m Generate config.yml using mid resources"
+   echo "   -h Generate config.yml using high resources"
+   echo "   No flags generates the default config.yml using low resources and the three"
+   echo "   templates (config.yml.LOWRES, config.yml.MIDRES and config.yml.HIGHRES)"
+   exit 1
+ }
+ 
+ lowres=false
+ midres=false
+ highres=false
+ while getopts ":lmh" opt; do
+   case $opt in
+       l ) ($midres || $highres) && die "Cannot specify option -l after specifying options -m or -h"
+           lowres=true
+           ;;
+       m ) ($lowres || $highres) && die "Cannot specify option -m after specifying options -l or -h"
+           midres=true
+           ;;
+       h ) ($lowres || $midres) && die "Cannot specify option -h after specifying options -l or -m"
+           highres=true
+           ;;
+       \?) die "Invalid option: -$OPTARG"
+           ;;
+   esac
+ done
+ 
+ if $lowres; then
+   echo "Generating new config.yml file with low resources from config-2_1.yml"
+   circleci config process $BASEDIR/config-2_1.yml > $BASEDIR/config.yml.LOWRES.tmp
+   cat $BASEDIR/license.yml $BASEDIR/config.yml.LOWRES.tmp > $BASEDIR/config.yml
+   rm $BASEDIR/config.yml.LOWRES.tmp
+ 
+ elif $midres; then
+   echo "Generating new config.yml file with middle resources from config-2_1.yml"
+   patch -o $BASEDIR/config-2_1.yml.MIDRES $BASEDIR/config-2_1.yml $BASEDIR/config-2_1.yml.mid_res.patch
+   circleci config process $BASEDIR/config-2_1.yml.MIDRES > $BASEDIR/config.yml.MIDRES.tmp
+   cat $BASEDIR/license.yml $BASEDIR/config.yml.MIDRES.tmp > $BASEDIR/config.yml
+   rm $BASEDIR/config-2_1.yml.MIDRES $BASEDIR/config.yml.MIDRES.tmp
+ 
+ elif $highres; then
+   echo "Generating new config.yml file with high resources from config-2_1.yml"
+   patch -o $BASEDIR/config-2_1.yml.HIGHRES $BASEDIR/config-2_1.yml $BASEDIR/config-2_1.yml.high_res.patch
+   circleci config process $BASEDIR/config-2_1.yml.HIGHRES > $BASEDIR/config.yml.HIGHRES.tmp
+   cat $BASEDIR/license.yml $BASEDIR/config.yml.HIGHRES.tmp > $BASEDIR/config.yml
+   rm $BASEDIR/config-2_1.yml.HIGHRES $BASEDIR/config.yml.HIGHRES.tmp
+ 
+ else
+   echo "Generating new config.yml file with low resources and LOWRES/MIDRES/HIGHRES templates from config-2_1.yml"
+ 
+   # setup lowres
+   circleci config process $BASEDIR/config-2_1.yml > $BASEDIR/config.yml.LOWRES.tmp
+   cat $BASEDIR/license.yml $BASEDIR/config.yml.LOWRES.tmp > $BASEDIR/config.yml.LOWRES
+   rm $BASEDIR/config.yml.LOWRES.tmp
+ 
+   # setup midres
+   patch -o $BASEDIR/config-2_1.yml.MIDRES $BASEDIR/config-2_1.yml $BASEDIR/config-2_1.yml.mid_res.patch
+   circleci config process $BASEDIR/config-2_1.yml.MIDRES > $BASEDIR/config.yml.MIDRES.tmp
+   cat $BASEDIR/license.yml $BASEDIR/config.yml.MIDRES.tmp > $BASEDIR/config.yml.MIDRES
+   rm $BASEDIR/config-2_1.yml.MIDRES $BASEDIR/config.yml.MIDRES.tmp
+ 
+   # setup highres
+   patch -o $BASEDIR/config-2_1.yml.HIGHRES $BASEDIR/config-2_1.yml $BASEDIR/config-2_1.yml.high_res.patch
+   circleci config process $BASEDIR/config-2_1.yml.HIGHRES > $BASEDIR/config.yml.HIGHRES.tmp
+   cat $BASEDIR/license.yml $BASEDIR/config.yml.HIGHRES.tmp > $BASEDIR/config.yml.HIGHRES
+   rm $BASEDIR/config-2_1.yml.HIGHRES $BASEDIR/config.yml.HIGHRES.tmp
+ 
+   # copy lower into config.yml to make sure this gets updated
+   cp $BASEDIR/config.yml.LOWRES $BASEDIR/config.yml
+ fi
+ 
+ 
 -

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org