ruby-changes:53765
From: shyouhei <ko1@a...>
Date: Mon, 26 Nov 2018 11:46:56 +0900 (JST)
Subject: [ruby-changes:53765] shyouhei:r65982 (trunk): .travis.yml: avoid bashism
shyouhei 2018-11-26 11:46:50 +0900 (Mon, 26 Nov 2018) New Revision: 65982 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=65982 Log: .travis.yml: avoid bashism We can set environment variables to avoid before_script. Modified files: trunk/.travis.yml Index: .travis.yml =================================================================== --- .travis.yml (revision 65981) +++ .travis.yml (revision 65982) @@ -230,9 +230,8 @@ env: https://github.com/ruby/ruby/blob/trunk/.travis.yml#L230 - "GCC_FLAGS='-ansi -Werror=pedantic -pedantic-errors -std=iso9899:1990'" - "CONFIG_FLAG=" - "JOBS=" - # construct warnflags (using bashism...) - before_install: | - warnflags_array=( + - >- + warnflags=' -Wall -Wextra -Werror=declaration-after-statement @@ -255,10 +254,8 @@ env: https://github.com/ruby/ruby/blob/trunk/.travis.yml#L254 -Wno-unused-local-typedef -Wno-unused-parameter -Wunused-variable - ) - CONFIG_FLAG_ARRAY=( - warnflags="${warnflags_array[*]}" - LDFLAGS=-Wno-unused-command-line-argument) + ' + - "LDFLAGS='-Wno-unused-command-line-argument'" - &rubyspec name: ruby/spec on Ruby 2.3 # to ensure version guards are correctly added @@ -342,8 +339,7 @@ before_script: https://github.com/ruby/ruby/blob/trunk/.travis.yml#L339 gcc*) the_gcc=(ccache $CC ${GCC_FLAGS[@]} -fno-diagnostics-color) ;; clang*) the_gcc=(ccache $CC ${GCC_FLAGS[@]} -fno-color-diagnostics) ;; esac - - |- - $SETARCH ../configure -C --disable-install-doc --prefix=/tmp/ruby-prefix --with-gcc="${the_gcc[*]}" $CONFIG_FLAG "${CONFIG_FLAG_ARRAY[@]}" + - "$SETARCH ../configure -C --disable-install-doc --prefix=/tmp/ruby-prefix --with-gcc=\"${the_gcc[*]}\" $CONFIG_FLAG" - "cp -pr config.cache config.status .ext/include ../config_1st" - "$SETARCH make reconfig" - "cp -pr config.cache config.status .ext/include ../config_2nd" -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/