embed files in the bin
This commit is contained in:
parent
2dbfb4bbd7
commit
e9f057db55
3 changed files with 17 additions and 13 deletions
|
@ -2,12 +2,13 @@
|
|||
--
|
||||
-- see: https://github.com/sol/hpack
|
||||
--
|
||||
-- hash: a686a36064ef8ecb9b6b995eff90b19c3c02223326995cc6f0ae33c7f7d699f5
|
||||
-- hash: 33fb8dc1910b29dc2948850dc3ab52f6a6c420a93c0113d1fc81076fcd555c3a
|
||||
|
||||
name: gpm
|
||||
version: 0.1.0.0
|
||||
category: Test
|
||||
stability: alpha (experimental)
|
||||
homepage: https://gitlab.esy.fun/yogsototh/gpm
|
||||
author: Yann Esposito
|
||||
maintainer: yann.esposito@gmail.com
|
||||
copyright: © 2017 Yann Esposito
|
||||
|
@ -30,6 +31,7 @@ library
|
|||
ghc-options: -O2 -Werror -Wall -Wcompat -Wincomplete-uni-patterns -Wredundant-constraints -Wnoncanonical-monad-instances
|
||||
build-depends:
|
||||
base >=4.8 && <5
|
||||
, file-embed
|
||||
, protolude
|
||||
, turtle
|
||||
default-language: Haskell2010
|
||||
|
@ -44,6 +46,7 @@ executable gpm
|
|||
ghc-options: -O2 -Werror -Wall -Wcompat -Wincomplete-uni-patterns -Wredundant-constraints -Wnoncanonical-monad-instances -threaded -rtsopts -with-rtsopts=-N -optP-Wno-nonportable-include-path
|
||||
build-depends:
|
||||
base >=4.8 && <5
|
||||
, file-embed
|
||||
, gpm
|
||||
, protolude
|
||||
, turtle
|
||||
|
|
|
@ -5,7 +5,7 @@ author: Yann Esposito
|
|||
maintainer: yann.esposito@gmail.com
|
||||
copyright: © 2017 Yann Esposito
|
||||
license: ISC
|
||||
url: https://gitlab.esy.fun/yogsototh/gpm
|
||||
homepage: https://gitlab.esy.fun/yogsototh/gpm
|
||||
default-extensions:
|
||||
- OverloadedStrings
|
||||
- NoImplicitPrelude
|
||||
|
@ -26,6 +26,7 @@ dependencies:
|
|||
- base >=4.8 && <5
|
||||
- protolude
|
||||
- turtle
|
||||
- file-embed
|
||||
library:
|
||||
source-dirs: src
|
||||
executables:
|
||||
|
|
16
src/GPM.hs
16
src/GPM.hs
|
@ -1,12 +1,15 @@
|
|||
{-# LANGUAGE NoImplicitPrelude #-}
|
||||
{-# LANGUAGE OverloadedStrings #-}
|
||||
{-# LANGUAGE TemplateHaskell #-}
|
||||
module GPM
|
||||
where
|
||||
|
||||
import Protolude hiding (stdout,(%),die)
|
||||
import Data.FileEmbed (embedStringFile)
|
||||
import Protolude hiding (die, stdout, (%))
|
||||
import Turtle
|
||||
|
||||
import GPM.Review (handleReview,ReviewCommand(..),parseReviewCmd)
|
||||
import GPM.Review (ReviewCommand (..), handleReview,
|
||||
parseReviewCmd)
|
||||
|
||||
gpm :: IO ()
|
||||
gpm = do
|
||||
|
@ -55,15 +58,13 @@ debug cmd = do
|
|||
initIssues :: IO ()
|
||||
initIssues = do
|
||||
echo "* issue.org"
|
||||
input ("templates" </> "issues.org")
|
||||
& output "issues.org"
|
||||
output "issues.org" $(embedStringFile "templates/issues.org")
|
||||
debug "git add issues.org"
|
||||
|
||||
initDocs :: IO ()
|
||||
initDocs = do
|
||||
echo "* wiki.org"
|
||||
input ("templates" </> "wiki.org")
|
||||
& output "wiki.org"
|
||||
output "wiki.org" $(embedStringFile "templates/wiki.org")
|
||||
debug "git add wiki.org"
|
||||
|
||||
initReview :: IO ()
|
||||
|
@ -71,6 +72,5 @@ initReview = do
|
|||
let fic = "reviews" </> "write-contributing-yogsototh.org"
|
||||
mktree "reviews"
|
||||
putText $ format ("* "%fp) fic
|
||||
input ("templates" </> "review.org")
|
||||
& output fic
|
||||
output fic $(embedStringFile "templates/review.org")
|
||||
debug "git add reviews"
|
||||
|
|
Loading…
Reference in a new issue