mirror of
https://github.com/digital-asset/daml.git
synced 2024-08-17 00:30:25 +03:00
ci/cron: add arg to select docs (#7569)
This is a preparatory step for moving at least some of the logic of checking signatures to this script. The reasoning for putting signatures in the same script basically boils down to "it already has GitHub pagination". I also removed the `run.sh` wrapper because it did not add anything anymore. It used to be useful, but across various changes it's sort of lost its purpose. CHANGELOG_BEGIN CHANGELOG_END
This commit is contained in:
parent
eb6b2ce1c6
commit
67746b7710
@ -37,7 +37,12 @@ jobs:
|
||||
- checkout: self
|
||||
- bash: ci/dev-env-install.sh
|
||||
displayName: 'Build/Install the Developer Environment'
|
||||
- bash: ci/cron/run.sh
|
||||
- bash: |
|
||||
set -euo pipefail
|
||||
eval "$(dev-env/bin/dade assist)"
|
||||
|
||||
bazel build //ci/cron:cron
|
||||
./bazel-bin/ci/cron/cron docs
|
||||
env:
|
||||
AWS_ACCESS_KEY_ID: $(AWS_ACCESS_KEY_ID)
|
||||
AWS_SECRET_ACCESS_KEY: $(AWS_SECRET_ACCESS_KEY)
|
||||
|
@ -1,20 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
# Copyright (c) 2020 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
SHA=$(git log -n1 --format=%H)
|
||||
|
||||
revert_sha () {
|
||||
git checkout $SHA
|
||||
}
|
||||
trap revert_sha EXIT
|
||||
|
||||
cd "$(dirname "$0")"/../..
|
||||
|
||||
eval "$(dev-env/bin/dade assist)"
|
||||
|
||||
bazel build //ci/cron:cron
|
||||
|
||||
./bazel-bin/ci/cron/cron
|
@ -24,6 +24,7 @@ import qualified Network.HTTP.Client as HTTP
|
||||
import qualified Network.HTTP.Client.TLS as TLS
|
||||
import qualified Network.HTTP.Types.Status as Status
|
||||
import qualified System.Directory as Directory
|
||||
import qualified System.Environment
|
||||
import qualified System.Exit as Exit
|
||||
import qualified System.IO.Extra as IO
|
||||
import qualified System.Process as System
|
||||
@ -233,8 +234,8 @@ fetch_s3_versions = do
|
||||
Just s3_json -> return $ map (\s -> PreVersion prerelease (version s)) $ H.keys s3_json
|
||||
Nothing -> Exit.die "Failed to get versions from s3"
|
||||
|
||||
main :: IO ()
|
||||
main = do
|
||||
docs :: IO ()
|
||||
docs = do
|
||||
Control.forM_ [IO.stdout, IO.stderr] $
|
||||
\h -> IO.hSetBuffering h IO.LineBuffering
|
||||
putStrLn "Checking for new version..."
|
||||
@ -257,3 +258,13 @@ main = do
|
||||
putStrLn "Updating versions.json & hidden.json"
|
||||
update_s3 temp_dir gh_versions
|
||||
reset_cloudfront
|
||||
|
||||
check_signatures :: IO ()
|
||||
check_signatures = do
|
||||
putStrLn "FIXME"
|
||||
|
||||
main :: IO ()
|
||||
main = System.Environment.getArgs >>= parse
|
||||
where parse ["docs"] = docs
|
||||
parse ["check-signatures"] = check_signatures
|
||||
parse _ = Exit.die "Arg required: docs, check-signatures"
|
||||
|
Loading…
Reference in New Issue
Block a user