mirror of
https://github.com/digital-asset/daml.git
synced 2024-09-20 01:07:18 +03:00
Update both hidden.json and snapshots.json (#8513)
* Update both hidden.json and snapshots.json The assistant relies on the latter, our docs cronjob on the former. I have no idea why we have two but keeping them in sync should be fine. changelog_begin changelog_end * maybe I should test if my code compiles before pushing changelog_begin changelog_end
This commit is contained in:
parent
867041ce61
commit
dfc48a0010
@ -136,13 +136,15 @@ fetch_if_missing opts temp v = do
|
||||
|
||||
update_s3 :: DocOptions -> FilePath -> Versions -> IO ()
|
||||
update_s3 opts temp vs = do
|
||||
putStrLn "Updating versions.json, hidden.json, latest..."
|
||||
putStrLn "Updating versions.json, hidden.json, snapshots.json, latest..."
|
||||
create_versions_json (dropdown vs) (temp </> "versions.json")
|
||||
let hidden = Data.List.sortOn Data.Ord.Down $ Set.toList $ all_versions vs `Set.difference` (Set.fromList $ dropdown vs)
|
||||
create_versions_json hidden (temp </> "hidden.json")
|
||||
let push f = proc_ ["aws", "s3", "cp", temp </> f, s3Path opts f, "--acl", "public-read"]
|
||||
let hiddenVersionFiles = ["hidden.json", "snapshots.json"]
|
||||
Data.Foldable.for_ hiddenVersionFiles $ \f -> do
|
||||
create_versions_json hidden (temp </> f)
|
||||
push f
|
||||
push "versions.json"
|
||||
push "hidden.json"
|
||||
Control.Monad.Extra.whenJust (top vs) $ \latest -> do
|
||||
writeFile (temp </> "latest") (show latest)
|
||||
push "latest"
|
||||
|
Loading…
Reference in New Issue
Block a user