Skip to content

Commit

Permalink
Update help option user documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
harendra-kumar committed Dec 16, 2023
1 parent c3eaced commit 1d3ba41
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 32 deletions.
30 changes: 15 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -278,8 +278,7 @@ n|N|no|No|NO|false|False|FALSE|off|Off|OFF or empty for a negative value.
--------------------------------------------------
Commands and flags
--------------------------------------------------
cabal-v2 : build using cabal v2-build
cabal : alias for cabal-v2
cabal : build using cabal
stack : build using stack
hlint : run hlint
clean : remove the .packcheck directory
Expand All @@ -291,11 +290,12 @@ help | --help | -h : show this help message
Selecting tool versions
--------------------------------------------------
GHCUPVER : [a.b.c.d] GHCUP version to install GHCVER if needed
GHCVER : [a.b.c] GHC version prefix (may not be enforced when using stack)
GHCVER : [a.b.c | head] GHC version prefix (may not be enforced when using stack)
CABALVER : [a.b.c.d] Cabal version (prefix) to use
RESOLVER : Stack resolver to use for stack builds or cabal builds using stack
STACKVER : [a.b.c.d] Stack version (prefix) to use
STACK_UPGRADE : [y] DESTRUCTIVE! Upgrades stack to latest version
RESOLVER : Stack resolver to use for stack builds or cabal builds using stack
HLINTVER : Download a specific version binary of hlint instead of using one in PATH
--------------------------------------------------
Where to find the required tools
Expand All @@ -305,9 +305,9 @@ PATH : [path] Set PATH explicitly for predictable builds
--------------------------------------------------
Specifying common tool options
--------------------------------------------------
GHCUP_OPTIONS : Used as in "ghcup install ghc <GHCUP_OPTIONS> <version>"
GHC_OPTIONS : Specify GHC options to use
SDIST_OPTIONS : Arguments to stack/cabal sdist command
CABAL_REINIT_CONFIG : [y] DESTRUCTIVE! Remove old config to avoid incompatibility issues
--------------------------------------------------
Specifying what to build
Expand All @@ -320,34 +320,34 @@ DISABLE_SDIST_PROJECT_CHECK: [y] Ignore project file and continue
DISABLE_SDIST_GIT_CHECK : [y] Do not compare source distribution with git repo
DISABLE_DIST_CHECKS : [y] Do not perform source distribution checks
--------------------------------------------------
stack options
--------------------------------------------------
STACK_YAML : Alternative stack config file path relative to project root
STACK_OPTIONS : ADDITIONAL stack global options (e.g. -v) to append
STACK_BUILD_OPTIONS : ADDITIONAL stack build command options to append
--------------------------------------------------
cabal options
--------------------------------------------------
CABAL_REINIT_CONFIG : [y] DESTRUCTIVE! Remove old config to avoid incompatibility issues
CABAL_PROJECT : Alternative cabal project file, path relative to project root
CABAL_BUILD_OPTIONS : ADDITIONAL cabal v2-build options to append to defaults
CABAL_DISABLE_DEPS : [y] Do not install dependencies, do not do cabal update
CABAL_BUILD_TARGETS : cabal v2-build targets, default is 'all'
CABAL_CHECK_RELAX : [y] Do not fail if cabal check fails on the package.
--------------------------------------------------
Coverage options
stack options
--------------------------------------------------
COVERAGE : [y] Just generate coverage information
STACK_YAML : Alternative stack config file path relative to project root
STACK_OPTIONS : ADDITIONAL stack global options (e.g. -v) to append
STACK_BUILD_OPTIONS : ADDITIONAL stack build command options to append
--------------------------------------------------
hlint options
--------------------------------------------------
HLINTVER : Download a specific version binary of hlint instead of using one in PATH
HLINT_OPTIONS : hlint arguments e.g.'--datadir=. lint'
HLINT_TARGETS : target directories to run hlint on e.g. 'src test'
--------------------------------------------------
Coverage options
--------------------------------------------------
COVERAGE : [y] Just generate coverage information
--------------------------------------------------
Diagnostics options
--------------------------------------------------
Expand Down
34 changes: 17 additions & 17 deletions packcheck.sh
Original file line number Diff line number Diff line change
Expand Up @@ -337,8 +337,8 @@ show_help() {
echo "n|N|no|No|NO|false|False|FALSE|off|Off|OFF or empty for a negative value."

show_step1 "Commands and flags"
help_cmd cabal-v2 "build using cabal v2-build"
help_cmd cabal "alias for cabal-v2"
#help_cmd cabal-v2 "build using cabal v2-build"
help_cmd cabal "build using cabal"
#help_cmd cabal-new "Deprecated alias to cabal-v2"
#help_cmd cabal-v1 "Deprecated: build using cabal v1-build"
help_cmd stack "build using stack"
Expand All @@ -353,11 +353,12 @@ show_help() {
# untested/unsupported
#help_envvar ENABLE_GHCJS "[y] Use GHCJS instead of GHC to build"
help_envvar GHCUPVER "[a.b.c.d] GHCUP version to install GHCVER if needed"
help_envvar GHCVER "[a.b.c] GHC version prefix (may not be enforced when using stack)"
help_envvar GHCVER "[a.b.c | head] GHC version prefix (may not be enforced when using stack)"
help_envvar CABALVER "[a.b.c.d] Cabal version (prefix) to use"
help_envvar RESOLVER "Stack resolver to use for stack builds or cabal builds using stack"
help_envvar STACKVER "[a.b.c.d] Stack version (prefix) to use"
help_envvar STACK_UPGRADE "[y] DESTRUCTIVE! Upgrades stack to latest version"
help_envvar RESOLVER "Stack resolver to use for stack builds or cabal builds using stack"
help_envvar HLINTVER "Download a specific version binary of hlint instead of using one in PATH"

show_step1 "Where to find the required tools"
help_envvar PATH "[path] Set PATH explicitly for predictable builds"
Expand All @@ -368,11 +369,9 @@ show_help() {
# TODO
# help_envvar TOOL_OPTIONS "Specify the tool specific (stack or cabal) options to use."
# help_envvar BUILD_OPTIONS "Specify the tool specific build (stack build or cabal new-build) options to use."
help_envvar GHCUP_OPTIONS "Used as in \"ghcup install ghc <GHCUP_OPTIONS> <version>\""
help_envvar GHC_OPTIONS "Specify GHC options to use"
help_envvar GHCUP_OPTIONS "Used as in \"ghcup install ghc GHCUP_OPTIONS version\""
help_envvar SDIST_OPTIONS "Arguments to stack/cabal sdist command"
# XXX this applies to both stack and cabal builds
help_envvar CABAL_REINIT_CONFIG "[y] DESTRUCTIVE! Remove old config to avoid incompatibility issues"

show_step1 "Specifying what to build"
help_envvar DISABLE_BENCH "[y] Do not build benchmarks, default is to build but not run"
Expand All @@ -384,12 +383,9 @@ show_help() {
help_envvar DISABLE_DIST_CHECKS "[y] Do not perform source distribution checks"
#help_envvar ENABLE_INSTALL "[y] DESTRUCTIVE! Install the package after building"

show_step1 "stack options"
help_envvar STACK_YAML "Alternative stack config file path relative to project root"
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"

show_step1 "cabal options"
# XXX this applies to both stack and cabal builds
help_envvar CABAL_REINIT_CONFIG "[y] DESTRUCTIVE! Remove old config to avoid incompatibility issues"
help_envvar CABAL_PROJECT "Alternative cabal project file, path relative to project root"
#help_envvar CABAL_USE_STACK_SDIST "[y] Use stack sdist (to use --pvp-bounds)"
help_envvar CABAL_BUILD_OPTIONS "ADDITIONAL cabal v2-build options to append to defaults"
Expand All @@ -399,19 +395,23 @@ show_help() {
# XXX Untested/Unsupported, should be removed
#help_envvar CABAL_HACKAGE_MIRROR "DESTRUCTIVE! Specify an alternative mirror, modifies the cabal config file."

show_step1 "Coverage options"
# Untested/unsupported should be removed
#help_envvar COVERALLS_OPTIONS "hpc-coveralls args and options, usually just test suite names"
help_envvar COVERAGE "[y] Just generate coverage information"
show_step1 "stack options"
help_envvar STACK_YAML "Alternative stack config file path relative to project root"
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"

show_step1 "hlint options"
#help_envvar HLINT_COMMANDS "hlint commands e.g.'hlint lint src; hlint lint test'"
help_envvar HLINTVER "Download a specific version binary of hlint instead of using one in PATH"
# XXX this is broken
#help_envvar HLINT_BUILD "Build latest hlint from hackage source"
help_envvar HLINT_OPTIONS "hlint arguments e.g.'--datadir=. lint'"
help_envvar HLINT_TARGETS "target directories to run hlint on e.g. 'src test'"

show_step1 "Coverage options"
# Untested/unsupported should be removed
#help_envvar COVERALLS_OPTIONS "hpc-coveralls args and options, usually just test suite names"
help_envvar COVERAGE "[y] Just generate coverage information"

show_step1 "Diagnostics options"
# To catch spelling mistakes in envvar names passed, otherwise they will be
# silently ignored and we will be wondering why the script is not working.
Expand Down

0 comments on commit 1d3ba41

Please sign in to comment.