on master help sign in
Fix --help command for run-ci.sh
commit3c428a1139758eb1c73b0239f69e9ac30133780b authorHarendra Kumar <harendra@composewell.com> dateSat 20 Feb 2021, 09:55 (6 years ago) parent77d11d3
1 file changed+26−6
bin/run-ci.sh+26−6
bin/run-ci.sh+26−6
@@ -26,6 +26,18 @@ basic () {
2626 DISABLE_SDIST_BUILD=y \
2727 CABAL_PROJECT=cabal.project.ci \
2828 CABAL_BUILD_OPTIONS=\"--flag inspection --flag fusion-plugin\""
29+# chart deps do not build with ghc-8.10 on nix
30+# nix-shell \
31+# --argstr compiler "ghc8101" \
32+# --argstr c2nix "--flag dev" \
33+# --run "cabal build chart --flag dev"
34+# nix-shell \
35+# --argstr compiler "ghc8101" \
36+# --argstr c2nix "--flag inspection" \
37+# --run "\
38+# bin/bench.sh \
39+# --quick \
40+# --cabal-build-options \"--cabal-project cabal.project.ci --flag inspection --flag fusion-plugin\""
2941 }
3042
3143#------------------------------------------------------------------------------
@@ -116,6 +128,18 @@ ghc844 () { ghc 865 8.4.4; }
116128# Read command line
117129#-----------------------------------------------------------------------------
118130
131+ALL_TARGETS="all basic hlint coverage flags ghc883 ghc864 ghc844"
132+
133+print_targets () {
134+ echo "Available targets: $ALL_TARGETS"
135+}
136+
137+print_help () {
138+ echo "Usage: $0 --targets <space separated target names>"
139+ print_targets
140+ exit
141+}
142+
119143while test -n "$1"
120144do
121145 case $1 in
@@ -128,11 +152,9 @@ do
128152 esac
129153done
130154
131−ALL_TARGETS="all basic hlint coverage flags ghc883 ghc864 ghc844"
132−
133155if test "$(has_item "$TARGETS" help)" = "help"
134156then
135− echo "Available targets: $ALL_TARGETS"
157+ print_targets
136158 exit
137159fi
138160
@@ -143,9 +165,7 @@ fi
143165
144166if test -z "$TARGETS"
145167then
146− echo "Usage: $0 --targets <space separated target names>"
147− echo "Available targets: $ALL_TARGETS"
148− exit
168+ print_help
149169fi
150170
151171for i in $TARGETS