on master help sign in
ob deploy: handoff to project's command
commit6818348b7e338e76db720f68d67396e02b4225e3 authorLuigy Leon <luigy@outlook.com> dateMon 21 May 2018, 16:13 (8 years ago) parent86d9c30
3 files changed+12
default.nix+1 lib/command/src/Obelisk/Command/Deploy.hs+8 lib/command/src/Obelisk/Command/Project.hs+3
default.nix+1
@@ -284,6 +284,7 @@ rec {
284284 { server = { hostName }:
285285 let exe = serverExe projectOut.ghc.backend projectOut.ghcjs.frontend assets.symlinked configPath;
286286 in server exe hostName;
287+ obelisk = import (base + "/.obelisk/impl") {};
287288 };
288289 haskellPackageSets = {
289290 ghc = reflex-platform.ghc.override {
lib/command/src/Obelisk/Command/Deploy.hs+8
@@ -26,6 +26,7 @@ import Obelisk.App (MonadObelisk)
2626import Obelisk.CLI (Severity (..), callProcessAndLogOutput, failWith, withSpinner)
2727import Obelisk.CLI.Logging
2828import Obelisk.Command.Nix
29+import Obelisk.Command.Project
2930import Obelisk.Command.Thunk
3031import Obelisk.Command.Utils
3132
@@ -54,8 +55,15 @@ deployInit thunkPtr configDir deployDir sshKeyPath hostnames = do
5455 verifyHostKey (deployDir </> "backend_known_hosts") localKey hostname
5556 liftIO $ do
5657 createThunk (deployDir </> "src") thunkPtr
58+ liftIO $ setupObeliskImpl deployDir
5759 initGit deployDir
5860
61+setupObeliskImpl :: FilePath -> IO ()
62+setupObeliskImpl deployDir = do
63+ let implDir = toImplDir deployDir
64+ createDirectoryIfMissing True implDir
65+ writeFile (implDir </> "default.nix") "(import ../../src {}).obelisk"
66+
5967deployPush :: MonadObelisk m => FilePath -> m ()
6068deployPush deployPath = do
6169 let backendHosts = deployPath </> "backend_hosts"
lib/command/src/Obelisk/Command/Project.hs+3
@@ -10,6 +10,9 @@ module Obelisk.Command.Project
1010 , inProjectShell
1111 , inImpureProjectShell
1212 , projectShell
13+
14+ , toObeliskDir
15+ , toImplDir
1316 ) where
1417
1518import Control.Monad