diff options
author | pacien | 2020-02-13 21:51:18 +0100 |
---|---|---|
committer | Notkea | 2020-02-13 23:00:22 +0100 |
commit | bc4978e8060e106958498d78cb96b5103bf6f6ff (patch) | |
tree | 4ceeb97efe403e2e7db50594289d48a7275aa487 /compiler/app | |
parent | 38af8a4c820d385e7801a5c557938044225e4468 (diff) | |
download | ldgallery-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/app')
-rw-r--r-- | compiler/app/Main.hs | 8 |
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) | |||
22 | import Paths_ldgallery_compiler (version, getDataFileName) | 22 | import Paths_ldgallery_compiler (version, getDataFileName) |
23 | import Control.Monad (when) | 23 | import Control.Monad (when) |
24 | import Data.Version (showVersion) | 24 | import Data.Version (showVersion) |
25 | import Data.Int (Int64) | ||
26 | import Data.Aeson (ToJSON) | 25 | import Data.Aeson (ToJSON) |
27 | import Data.Time.Clock.System (getSystemTime, systemSeconds) | ||
28 | import System.FilePath ((</>)) | 26 | import System.FilePath ((</>)) |
29 | import System.Directory (canonicalizePath) | 27 | import System.Directory (canonicalizePath) |
30 | import System.Console.CmdArgs | 28 | import System.Console.CmdArgs |
@@ -35,7 +33,6 @@ import Files (readDirectory, copyTo) | |||
35 | 33 | ||
36 | data ViewerConfig = ViewerConfig | 34 | data 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 | ||