toodles 1.2.1 → 1.2.2
raw patch · 3 files changed
+24/−5 lines, 3 filesdep +filepath
Dependencies added: filepath
Files
- README.md +2/−2
- app/Main.hs +20/−2
- toodles.cabal +2/−1
README.md view
@@ -118,9 +118,9 @@ ### Building Toodles -Toodles builds with stack [stack](https://docs.haskellstack.org). Just a `stack+Toodles builds with [stack](https://docs.haskellstack.org). Just a `stack build` should do it. If you'd like to build toodles without cloning the source,-you can have stack build toodles with `stack install --resolver=lts-12.14`!+you can have stack build toodles with `stack install --resolver=lts-12.14 toodles`! #### Building with Docker
app/Main.hs view
@@ -8,16 +8,34 @@ import Server import Types +import Control.Monad (when) import Data.IORef (newIORef) import Data.Maybe (fromMaybe) import qualified Data.Text as T (unpack) import Network.Wai.Handler.Warp (run)+import System.Directory+import System.Environment+import System.FilePath.Posix import Text.Printf (printf) main :: IO () main = do- dataDir <- getDataDir- licenseRead <- readLicense (dataDir ++ "/toodles-license-public-key.pem") "/etc/toodles/license.json"+ dataDirLocal <- (return . takeDirectory) =<< getExecutablePath+ dataDirBuilt <- getDataDir+ useBinaryLocalDataDir <- doesDirectoryExist $ dataDirLocal <> "/web"+ useBuiltDataDir <- doesDirectoryExist $ dataDirBuilt <> "/web"+ when+ (not useBuiltDataDir && not useBuiltDataDir)+ (fail+ "Couldn't initialize toodles, no valid data directory found. Please file a bug on Github.")+ let dataDir =+ if useBinaryLocalDataDir+ then dataDirLocal+ else dataDirBuilt+ licenseRead <-+ readLicense+ (dataDir ++ "/toodles-license-public-key.pem")+ "/etc/toodles/license.json" let license = (either (BadLicense) (id) licenseRead) userArgs <- toodlesArgs >>= setAbsolutePath case userArgs of
toodles.cabal view
@@ -1,6 +1,6 @@ cabal-version: 1.12 name: toodles-version: 1.2.1+version: 1.2.2 license: MIT license-file: LICENSE copyright: 2019 Avi Press@@ -95,6 +95,7 @@ cmdargs ==0.10.20, directory ==1.3.1.5, extra ==1.6.13,+ filepath ==1.4.2, megaparsec ==6.5.0, process >=1.6.3.0 && <1.7, regex-posix ==0.95.2,