From 3be460b9c8d4cf53eeacf1ac319c97420f6345cc Mon Sep 17 00:00:00 2001 From: Harendra Kumar Date: Wed, 14 Mar 2018 15:31:12 +0530 Subject: [PATCH] make STACK_BUILD_OPTIONS and CABAL_CONFIGURE_OPTIONS append --- Changelog.md | 9 +++++++-- packcheck.sh | 18 +++++++----------- 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/Changelog.md b/Changelog.md index 3892420..25aa72f 100644 --- a/Changelog.md +++ b/Changelog.md @@ -1,8 +1,13 @@ ## 0.1.2 +### Breaking Changes +* STACK_BUILD_OPTIONS and CABAL_CONFIGURE_OPTIONS now append to the existing + options instead of overriding them. +* Do not enforce specific stack version in CI configs - to avoid failures due + to github API limits when upgrading or downgrading. + +### Enhancements * Better documentation in travis and appveyor configs -* Do not enforce specific stack version in CI configs to avoid failures due to - github API limits when upgrading or downgrading. ## 0.1.1 diff --git a/packcheck.sh b/packcheck.sh index 76967c2..f444d16 100755 --- a/packcheck.sh +++ b/packcheck.sh @@ -300,13 +300,13 @@ show_help() { show_step1 "Advanced stack build parameters or env variables" help_envvar STACK_YAML "Alternative stack config, cannot be a path, just the file name" - help_envvar STACK_OPTIONS "Provide additional stack global options (e.g. -v)" - help_envvar STACK_BUILD_OPTIONS "Override the default stack build command options" + help_envvar STACK_OPTIONS "ADDITIONAL stack global options (e.g. -v) to append" + help_envvar STACK_BUILD_OPTIONS "ADDITIONAL stack build command options to append" help_envvar STACK_UPGRADE "[y] DESTRUCTIVE! Upgrades stack to latest version" show_step1 "Advanced cabal build parameters or env variables" help_envvar CABAL_USE_STACK_SDIST "[y] Use stack sdist (to use --pvp-bounds)" - help_envvar CABAL_CONFIGURE_OPTIONS "Override the default cabal configure options" + help_envvar CABAL_CONFIGURE_OPTIONS "ADDITIONAL default cabal configure options to append" help_envvar CABAL_CHECK_RELAX "[y] Do not fail if cabal check fails on the package." # The sandbox mode is a bit expensive because a sandbox is used and # dependencies have to be installed twice in two separate sandboxes, once to @@ -430,15 +430,12 @@ verify_build_config() { STACK_DEP_OPTIONS="--test --only-dependencies --ghc-options=-O0" test -z "$DISABLE_BENCH" && STACK_DEP_OPTIONS="$STACK_DEP_OPTIONS --bench" - init_default STACK_BUILD_OPTIONS \ - "--test \ - --haddock --no-haddock-deps" - STACK_BUILD_OPTIONS=$(cat << EOF - $STACK_BUILD_OPTIONS + --test --haddock --no-haddock-deps $(test -z "$DISABLE_BENCH" && echo "--bench --no-run-benchmarks") $(test -n "${COVERAGE}" && echo --coverage) $(test -n "${GHC_OPTIONS}" && echo --ghc-options=\"$GHC_OPTIONS\") + $STACK_BUILD_OPTIONS EOF ) else @@ -448,13 +445,12 @@ EOF test -z "$DISABLE_BENCH" && \ CABAL_DEP_OPTIONS="$CABAL_DEP_OPTIONS --enable-benchmarks" - init_default CABAL_CONFIGURE_OPTIONS \ - "--enable-tests" CABAL_CONFIGURE_OPTIONS=$(cat << EOF - $CABAL_CONFIGURE_OPTIONS + --enable-tests $(test -z "$DISABLE_BENCH" && echo "--enable-benchmarks") $(test -n "$COVERAGE" && echo --enable-coverage) $(test -n "$GHC_OPTIONS" && echo --ghc-options=\"$GHC_OPTIONS\") + $CABAL_CONFIGURE_OPTIONS EOF ) fi