🚧 WIP 🚧

This commit is contained in:
Yann Esposito (Yogsototh) 2018-10-10 00:19:48 +02:00
parent f6cb951c88
commit 838ae10ec6
Signed by untrusted user who does not match committer: yogsototh
GPG key ID: 7B19A4C650D59646
2 changed files with 8 additions and 3 deletions

View file

@ -3,6 +3,9 @@
*Principle: put project management info along the repository not in some DB.* *Principle: put project management info along the repository not in some DB.*
Clone the project, get the code, but also the issues, the doc, the webpage,
everything...
* Git Project Manager * Git Project Manager
Put a project management tool in git. Put a project management tool in git.

View file

@ -13,10 +13,11 @@ module GPM.Serve
) )
where where
import Protolude hiding (ask, die, (%),stdout) import Protolude hiding (die, (%))
import Turtle import Turtle
import GPM.Helpers (getGPMDataDir, debug, debug_, inDir) import GPM.Helpers (debug, debug_, getGPMDataDir,
inDir)
getPublicDir :: IO Turtle.FilePath getPublicDir :: IO Turtle.FilePath
getPublicDir = do getPublicDir = do
@ -28,7 +29,7 @@ getProjectRoot :: IO Turtle.FilePath
getProjectRoot = do getProjectRoot = do
mReporoot <- debug "git rev-parse --show-toplevel" mReporoot <- debug "git rev-parse --show-toplevel"
case mReporoot of case mReporoot of
Nothing -> die "You don't appear to be in a git repository." Nothing -> die "You don't appear to be in a git repository."
Just reporoot -> return (fromString (toS reporoot)) Just reporoot -> return (fromString (toS reporoot))
getPublicPrjDir :: IO Turtle.FilePath getPublicPrjDir :: IO Turtle.FilePath
@ -89,6 +90,7 @@ handleServeStart = do
pubDir <- getPublicDir pubDir <- getPublicDir
inDir pubDir $ inDir pubDir $
debug_ "git instaweb --http=webrick start" debug_ "git instaweb --http=webrick start"
-- TODO: Do not forget to also git serve
handleServeStop :: IO () handleServeStop :: IO ()
handleServeStop = do handleServeStop = do