on master help sign in
Fix --help command for run-ci.sh
3c428a1Harendra Kumar
bin/run-ci.sh+26−6
@@ -26,6 +26,18 @@ basic () {
26 DISABLE_SDIST_BUILD=y \
26 DISABLE_SDIST_BUILD=y \
27 CABAL_PROJECT=cabal.project.ci \
27 CABAL_PROJECT=cabal.project.ci \
28 CABAL_BUILD_OPTIONS=\"--flag inspection --flag fusion-plugin\""
28 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\""
29 }
41 }
30
42
31#------------------------------------------------------------------------------
43#------------------------------------------------------------------------------
@@ -116,6 +128,18 @@ ghc844 () { ghc 865 8.4.4; }
116# Read command line
128# Read command line
117#-----------------------------------------------------------------------------
129#-----------------------------------------------------------------------------
118
130
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+
119while test -n "$1"
143while test -n "$1"
120do
144do
121 case $1 in
145 case $1 in
@@ -128,11 +152,9 @@ do
128 esac
152 esac
129done
153done
130
154
131−ALL_TARGETS="all basic hlint coverage flags ghc883 ghc864 ghc844"
132−
133if test "$(has_item "$TARGETS" help)" = "help"
155if test "$(has_item "$TARGETS" help)" = "help"
134then
156then
135− echo "Available targets: $ALL_TARGETS"
157+ print_targets
136 exit
158 exit
137fi
159fi
138
160
@@ -143,9 +165,7 @@ fi
143
165
144if test -z "$TARGETS"
166if test -z "$TARGETS"
145then
167then
146− echo "Usage: $0 --targets <space separated target names>"
168+ print_help
147− echo "Available targets: $ALL_TARGETS"
148− exit
149fi
169fi
150
170
151for i in $TARGETS
171for i in $TARGETS