Skip to content

Commit

Permalink
Implement --no-test
Browse files Browse the repository at this point in the history
  • Loading branch information
pbrisbin committed Sep 13, 2024
1 parent 9e98fe5 commit b5cdaf6
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 23 deletions.
3 changes: 2 additions & 1 deletion _tools/restylers/app/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ main = do
image <- tagRestylerImage info
pure $ toRestyler info image

testRestylers opts.pull restylers $ fromMaybe [] opts.hspecArgs
when opts.test $ do
testRestylers opts.pull restylers $ fromMaybe [] opts.hspecArgs

when opts.push $ for_ restylers $ \restyler -> do
exists <- doesRestylerImageExist restyler.image
Expand Down
3 changes: 1 addition & 2 deletions _tools/restylers/restylers.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ cabal-version: 1.12
--
-- see: https://github.com/sol/hpack
--
-- hash: 7da616867866bdc30137187009623800895e2db0077b4692bac412de68ef276a
-- hash: 4a06e0f858191752112cac20e142a00cf45b6b32f8c2135c0fa3df4e2ef7b9d5

name: restylers
version: 0.0.0.0
Expand All @@ -18,7 +18,6 @@ library
Restylers.Env
Restylers.Image
Restylers.Image.Parse
Restylers.ImagePrefix
Restylers.Info
Restylers.Info.Build
Restylers.Info.Metadata
Expand Down
19 changes: 0 additions & 19 deletions _tools/restylers/src/Restylers/ImagePrefix.hs

This file was deleted.

10 changes: 9 additions & 1 deletion _tools/restylers/src/Restylers/Options.hs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ data Options = Options
, sha :: Text
, debug :: Bool
, build :: Bool
, test :: Bool
, pull :: Bool
, push :: Bool
, write :: Maybe FilePath
Expand Down Expand Up @@ -68,7 +69,14 @@ options =
<$> switch
( short 'B'
<> long "no-build"
<> help "Skip build before testing"
<> help "Skip building"
)
)
<*> ( not
<$> switch
( short 'T'
<> long "no-test"
<> help "Skip testing"
)
)
<*> ( not
Expand Down
1 change: 1 addition & 0 deletions _tools/restylers/test/Restylers/Info/ResolvedSpec.hs
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ testOptions _ =
, sha = "dev"
, debug = False
, build = False
, test = False
, pull = False
, push = False
, write = Nothing
Expand Down

0 comments on commit b5cdaf6

Please sign in to comment.