about summary refs log tree commit diff
path: root/pkgs/development/haskell-modules/patches/haskell-ci-optparse-applicative-0.17-ShellCheck-0.8.patch
blob: c1e1663627f7e790bdf7a3e5db75f330cf272a81 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
From 0cc6f0f8de1776d0b5851459d22a0997dfd735ce Mon Sep 17 00:00:00 2001
From: Oleg Grenrus <oleg.grenrus@iki.fi>
Date: Wed, 25 May 2022 14:09:49 +0300
Subject: [PATCH] Use ShellCheck-0.8.0 and optparse-applicative-0.17

Adapted from 0cc6f0f8de1776d0b5851459d22a0997dfd735ce to apply on top of
haskell-ci-0.14.3.

Co-Authored-By: sternenseemann <sternenseemann@systemli.org>

---
 haskell-ci.cabal        | 4 ++--
 src/HaskellCI/GitHub.hs | 7 ++++---
 2 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/haskell-ci.cabal b/haskell-ci.cabal
index 273bd422..6848402c 100644
--- a/haskell-ci.cabal
+++ b/haskell-ci.cabal
@@ -167,14 +167,14 @@ library haskell-ci-internal
     , ini                            ^>=0.4.1
     , lattices                       ^>=2
     , network-uri                    ^>=2.6.1.0
-    , optparse-applicative           ^>=0.16.1.0
+    , optparse-applicative           ^>=0.17.0.0
     , temporary                      ^>=1.3
     , unordered-containers           ^>=0.2.10.0
     , zinza                          ^>=0.2
 
   -- ShellCheck. Would need newer transformers for older GHC
   if flag(shellcheck)
-    build-depends: ShellCheck ==0.7.2
+    build-depends: ShellCheck ==0.8.0
 
 executable haskell-ci
   main-is:          Main.hs
diff --git a/src/HaskellCI/GitHub.hs b/src/HaskellCI/GitHub.hs
index f1a402e6..a2c6e4f6 100644
--- a/src/HaskellCI/GitHub.hs
+++ b/src/HaskellCI/GitHub.hs
@@ -653,9 +653,10 @@ makeGitHub _argv config@Config {..} gitconfig prj jobs@JobVersions {..} = do
     setup hvrppa ghcup
         | allGHCUP     = traverse_ liftSh ghcup
         | not anyGHCUP = traverse_ liftSh hvrppa
-        -- 2192: ${{ ...}} will match (ShellCheck think it doesn't)
-        -- 2129: individual redirects
-        | otherwise    = sh' [2193, 2129] $ unlines $
+        -- SC2192: ${{ ...}} will match (ShellCheck think it doesn't)
+        -- SC2129: individual redirects
+        -- SC2296: Parameter expansions can't start with {. Double check syntax. -- ${{ }} in YAML templating.
+        | otherwise    = sh' [2193, 2129, 2296] $ unlines $
             [ "if [ \"${{ matrix.setup-method }}\" = ghcup ]; then"
             ] ++
             [ "  " ++ shToString s