aboutsummaryrefslogtreecommitdiff
path: root/compiler
diff options
context:
space:
mode:
authorpacien2020-02-13 21:51:18 +0100
committerNotkea2020-02-13 23:00:22 +0100
commitbc4978e8060e106958498d78cb96b5103bf6f6ff (patch)
tree4ceeb97efe403e2e7db50594289d48a7275aa487 /compiler
parent38af8a4c820d385e7801a5c557938044225e4468 (diff)
downloadldgallery-bc4978e8060e106958498d78cb96b5103bf6f6ff.tar.gz
compiler: remove timestamp field from generated viewer config
As this field isn't used by the viewer anymore. GitHub: closes #124
Diffstat (limited to 'compiler')
-rw-r--r--compiler/app/Main.hs8
1 files changed, 1 insertions, 7 deletions
diff --git a/compiler/app/Main.hs b/compiler/app/Main.hs
index 594a5b7..753f281 100644
--- a/compiler/app/Main.hs
+++ b/compiler/app/Main.hs
@@ -22,9 +22,7 @@ import GHC.Generics (Generic)
22import Paths_ldgallery_compiler (version, getDataFileName) 22import Paths_ldgallery_compiler (version, getDataFileName)
23import Control.Monad (when) 23import Control.Monad (when)
24import Data.Version (showVersion) 24import Data.Version (showVersion)
25import Data.Int (Int64)
26import Data.Aeson (ToJSON) 25import Data.Aeson (ToJSON)
27import Data.Time.Clock.System (getSystemTime, systemSeconds)
28import System.FilePath ((</>)) 26import System.FilePath ((</>))
29import System.Directory (canonicalizePath) 27import System.Directory (canonicalizePath)
30import System.Console.CmdArgs 28import System.Console.CmdArgs
@@ -35,7 +33,6 @@ import Files (readDirectory, copyTo)
35 33
36data ViewerConfig = ViewerConfig 34data ViewerConfig = ViewerConfig
37 { galleryRoot :: String 35 { galleryRoot :: String
38 , generationTimestamp :: Int64
39 } deriving (Generic, Show, ToJSON) 36 } deriving (Generic, Show, ToJSON)
40 37
41 38
@@ -126,7 +123,4 @@ main =
126 >>= copyTo target 123 >>= copyTo target
127 124
128 writeViewerConfig :: FilePath -> IO () 125 writeViewerConfig :: FilePath -> IO ()
129 writeViewerConfig fileName = 126 writeViewerConfig fileName = writeJSON fileName $ ViewerConfig gallerySubdir
130 getSystemTime
131 >>= return . ViewerConfig gallerySubdir . systemSeconds
132 >>= writeJSON fileName