Skip to content

Commit

Permalink
make STACK_BUILD_OPTIONS and CABAL_CONFIGURE_OPTIONS append
Browse files Browse the repository at this point in the history
  • Loading branch information
harendra-kumar committed Mar 14, 2018
1 parent f0ad092 commit 3be460b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 13 deletions.
9 changes: 7 additions & 2 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -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

Expand Down
18 changes: 7 additions & 11 deletions packcheck.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 3be460b

Please sign in to comment.