File tree 1 file changed +13
-3
lines changed
1 file changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ import Options.Applicative ( Parser
28
28
import System.Directory ( doesDirectoryExist
29
29
, doesFileExist
30
30
)
31
+ import System.Process ( runCommand )
31
32
import Toml ( TomlCodec
32
33
, (.=)
33
34
)
@@ -74,13 +75,22 @@ main = do
74
75
75
76
app :: Arguments -> AppSettings -> IO ()
76
77
app args settings = case command' args of
77
- Run -> putStrLn " Run"
78
- Test -> putStrLn " Test"
79
78
Build -> build settings
79
+ Run -> do
80
+ build settings
81
+ let buildPrefix = appSettingsBuildPrefix settings
82
+ let
83
+ executableNames = map
84
+ (\ Executable { executableSourceDir = sourceDir, executableMainFile = mainFile, executableName = name } ->
85
+ sourceDir </> name
86
+ )
87
+ (appSettingsExecutables settings)
88
+ let executables = map (buildPrefix </> ) executableNames
89
+ mapM_ runCommand executables
90
+ Test -> putStrLn " Test"
80
91
81
92
build :: AppSettings -> IO ()
82
93
build settings = do
83
- putStrLn " Building"
84
94
let compiler = appSettingsCompiler settings
85
95
let projectName = appSettingsProjectName settings
86
96
let buildPrefix = appSettingsBuildPrefix settings
You can’t perform that action at this time.
0 commit comments