From 3ebfb1eca1a47adbbf33e867e161177dab646b94 Mon Sep 17 00:00:00 2001 From: Jon Rowe Date: Thu, 20 Jun 2024 11:33:49 +0100 Subject: [PATCH] Updated ci build scripts (from rspec-dev) 3-13 --- .github/dependabot.yml | 2 +- .github/workflows/ci.yml | 2 +- .rubocop_rspec_base.yml | 2 +- script/ci_functions.sh | 30 +++------------------- script/clone_all_rspec_repos | 6 ++--- script/cucumber.sh | 2 +- script/functions.sh | 13 +++++++--- script/legacy_setup.sh | 2 +- script/predicate_functions.sh | 2 +- script/run_build | 2 +- script/run_rubocop | 2 +- script/update_rubygems_and_install_bundler | 8 +++--- 12 files changed, 27 insertions(+), 46 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index fa6adbf09..e592ae5e7 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,4 +1,4 @@ -# This file was generated on 2023-12-25T16:05:21+00:00 from the rspec-dev repo. +# This file was generated on 2024-06-20T11:33:49+01:00 from the rspec-dev repo. # DO NOT modify it by hand as your changes will get lost the next time it is generated. version: 2 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f2d7d9308..b8f7c514a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,4 +1,4 @@ -# This file was generated on 2023-12-25T16:05:21+00:00 from the rspec-dev repo. +# This file was generated on 2024-06-20T11:33:49+01:00 from the rspec-dev repo. # DO NOT modify it by hand as your changes will get lost the next time it is generated. name: RSpec CI diff --git a/.rubocop_rspec_base.yml b/.rubocop_rspec_base.yml index 797c21a3a..f8bcf776a 100644 --- a/.rubocop_rspec_base.yml +++ b/.rubocop_rspec_base.yml @@ -1,4 +1,4 @@ -# This file was generated on 2023-12-25T16:05:21+00:00 from the rspec-dev repo. +# This file was generated on 2024-06-20T11:33:49+01:00 from the rspec-dev repo. # DO NOT modify it by hand as your changes will get lost the next time it is generated. # This file contains defaults for RSpec projects. Individual projects diff --git a/script/ci_functions.sh b/script/ci_functions.sh index 9d04ee16b..47d0780b7 100644 --- a/script/ci_functions.sh +++ b/script/ci_functions.sh @@ -1,4 +1,4 @@ -# This file was generated on 2023-12-25T16:05:21+00:00 from the rspec-dev repo. +# This file was generated on 2024-06-20T11:33:49+01:00 from the rspec-dev repo. # DO NOT modify it by hand as your changes will get lost the next time it is generated. # Taken from: @@ -30,41 +30,17 @@ nano_cmd="$(type -p gdate date | head -1)" nano_format="+%s%N" [ "$(uname -s)" != "Darwin" ] || nano_format="${nano_format/%N/000000000}" -travis_time_start() { - travis_timer_id=$(printf %08x $(( RANDOM * RANDOM ))) - travis_start_time=$($nano_cmd -u "$nano_format") - printf "travis_time:start:%s\r\e[0m" $travis_timer_id -} - -travis_time_finish() { - local travis_end_time=$($nano_cmd -u "$nano_format") - local duration=$(($travis_end_time-$travis_start_time)) - printf "travis_time:end:%s:start=%s,finish=%s,duration=%s\r\e[0m" \ - $travis_timer_id $travis_start_time $travis_end_time $duration -} - fold() { local name="$1" local status=0 shift 1 - if [ -n "$TRAVIS" ]; then - printf "travis_fold:start:%s\r\e[0m" "$name" - travis_time_start - else - echo "============= Starting $name ===============" - fi + echo "============= Starting $name ===============" "$@" status=$? - [ -z "$TRAVIS" ] || travis_time_finish - if [ "$status" -eq 0 ]; then - if [ -n "$TRAVIS" ]; then - printf "travis_fold:end:%s\r\e[0m" "$name" - else - echo "============= Ending $name ===============" - fi + echo "============= Ending $name ===============" else STATUS="$status" fi diff --git a/script/clone_all_rspec_repos b/script/clone_all_rspec_repos index 43bbb0e40..8853446bd 100755 --- a/script/clone_all_rspec_repos +++ b/script/clone_all_rspec_repos @@ -1,5 +1,5 @@ #!/bin/bash -# This file was generated on 2023-12-25T16:05:21+00:00 from the rspec-dev repo. +# This file was generated on 2024-06-20T11:33:49+01:00 from the rspec-dev repo. # DO NOT modify it by hand as your changes will get lost the next time it is generated. set -e @@ -8,11 +8,11 @@ source script/functions.sh if is_mri; then pushd .. - clone_repo "rspec" + clone_repo "rspec-metagem" "rspec" clone_repo "rspec-core" clone_repo "rspec-expectations" clone_repo "rspec-mocks" - clone_repo "rspec-rails" "6-1-maintenance" + clone_repo "rspec-rails" "rspec-rails" "6-1-maintenance" if rspec_support_compatible; then clone_repo "rspec-support" diff --git a/script/cucumber.sh b/script/cucumber.sh index 77801f29f..10c3bd0fd 100755 --- a/script/cucumber.sh +++ b/script/cucumber.sh @@ -1,5 +1,5 @@ #!/bin/bash -# This file was generated on 2023-12-25T16:05:21+00:00 from the rspec-dev repo. +# This file was generated on 2024-06-20T11:33:49+01:00 from the rspec-dev repo. # DO NOT modify it by hand as your changes will get lost the next time it is generated. set -e diff --git a/script/functions.sh b/script/functions.sh index c057844f4..6c5b876ad 100644 --- a/script/functions.sh +++ b/script/functions.sh @@ -1,4 +1,4 @@ -# This file was generated on 2023-12-25T16:05:21+00:00 from the rspec-dev repo. +# This file was generated on 2024-06-20T11:33:49+01:00 from the rspec-dev repo. # DO NOT modify it by hand as your changes will get lost the next time it is generated. SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" @@ -6,7 +6,6 @@ source $SCRIPT_DIR/ci_functions.sh source $SCRIPT_DIR/predicate_functions.sh # If JRUBY_OPTS isn't set, use these. -# see https://docs.travis-ci.com/user/ci-environment/ export JRUBY_OPTS=${JRUBY_OPTS:-"--server -Xcompile.invokedynamic=false"} SPECS_HAVE_RUN_FILE=specs.out MAINTENANCE_BRANCH=`cat maintenance-branch` @@ -20,12 +19,18 @@ fi function clone_repo { if [ ! -d $1 ]; then # don't clone if the dir is already there if [ -z "$2" ]; then + DIR_TARGET="$1" + else + DIR_TARGET="$2" + fi + + if [ -z "$3" ]; then BRANCH_TO_CLONE="${MAINTENANCE_BRANCH?}"; else - BRANCH_TO_CLONE="$2"; + BRANCH_TO_CLONE="$3"; fi; - ci_retry eval "git clone https://github.com/rspec/$1 --depth 1 --branch ${BRANCH_TO_CLONE?}" + ci_retry eval "git clone https://github.com/rspec/$1 --depth 1 --branch ${BRANCH_TO_CLONE?} ${DIR_TARGET?}" fi; } diff --git a/script/legacy_setup.sh b/script/legacy_setup.sh index 1c234277c..959c3ed4d 100755 --- a/script/legacy_setup.sh +++ b/script/legacy_setup.sh @@ -1,5 +1,5 @@ #!/bin/bash -# This file was generated on 2023-12-25T16:05:21+00:00 from the rspec-dev repo. +# This file was generated on 2024-06-20T11:33:49+01:00 from the rspec-dev repo. # DO NOT modify it by hand as your changes will get lost the next time it is generated. set -e diff --git a/script/predicate_functions.sh b/script/predicate_functions.sh index 3499d4bf7..900813dae 100644 --- a/script/predicate_functions.sh +++ b/script/predicate_functions.sh @@ -1,4 +1,4 @@ -# This file was generated on 2023-12-25T16:05:21+00:00 from the rspec-dev repo. +# This file was generated on 2024-06-20T11:33:49+01:00 from the rspec-dev repo. # DO NOT modify it by hand as your changes will get lost the next time it is generated. function is_mri { diff --git a/script/run_build b/script/run_build index 73ada2991..edace3256 100755 --- a/script/run_build +++ b/script/run_build @@ -1,5 +1,5 @@ #!/bin/bash -# This file was generated on 2023-12-25T16:05:21+00:00 from the rspec-dev repo. +# This file was generated on 2024-06-20T11:33:49+01:00 from the rspec-dev repo. # DO NOT modify it by hand as your changes will get lost the next time it is generated. set -e diff --git a/script/run_rubocop b/script/run_rubocop index f21724d52..6665b22f0 100755 --- a/script/run_rubocop +++ b/script/run_rubocop @@ -1,5 +1,5 @@ #!/bin/bash -# This file was generated on 2023-12-25T16:05:21+00:00 from the rspec-dev repo. +# This file was generated on 2024-06-20T11:33:49+01:00 from the rspec-dev repo. # DO NOT modify it by hand as your changes will get lost the next time it is generated. set -e diff --git a/script/update_rubygems_and_install_bundler b/script/update_rubygems_and_install_bundler index b3fc93801..8ba75cfdb 100755 --- a/script/update_rubygems_and_install_bundler +++ b/script/update_rubygems_and_install_bundler @@ -1,14 +1,14 @@ #!/bin/bash -# This file was generated on 2023-12-25T16:05:21+00:00 from the rspec-dev repo. +# This file was generated on 2024-06-20T11:33:49+01:00 from the rspec-dev repo. # DO NOT modify it by hand as your changes will get lost the next time it is generated. set -e source script/functions.sh if is_ruby_31_plus; then - echo "Installing rubygems 3.3.6 / bundler 2.3.6" - yes | gem update --system '3.3.6' - yes | gem install bundler -v '2.3.6' + echo "Installing most recent rubygems / bundler" + yes | gem update --no-document --system + yes | gem install --no-document bundler elif is_ruby_23_plus; then echo "Installing rubygems 3.2.22 / bundler 2.2.22" yes | gem update --system '3.2.22'