File tree 1 file changed +37
-0
lines changed
1 file changed +37
-0
lines changed Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+
3
+ # Copy doc/html to Google Cloud bucket cprover.diffblue.com
4
+
5
+ set -euo pipefail
6
+
7
+
8
+ # ### Variables
9
+
10
+ # User-defined variables
11
+ DOCS_FQDN=" cprover.diffblue.com"
12
+ DOCS_GS=" gs://${DOCS_FQDN} "
13
+
14
+ # Path to generated HTML documentation
15
+ DOCS_PATH=" $( dirname " $( readlink -f " $0 " ) " ) /../doc/html"
16
+
17
+ # Colors for nice output
18
+ GREEN=' \033[0;32m'
19
+ # RED='\033[0;31m'
20
+ NC=' \033[0m' # No Color
21
+
22
+
23
+ # ### Deployments
24
+
25
+ # For develop branch
26
+ if [[ " ${BRANCH:- null} " == " develop" ]]; then
27
+
28
+ echo -e " \n${GREEN} Uploading ${DOCS_FQDN}${NC} \n"
29
+ # Copy HTML docs to gcloud
30
+ gsutil -m -h " Cache-Control:public,max-age=60" \
31
+ rsync -r -d -c " ${DOCS_PATH} " " ${DOCS_GS} /"
32
+ echo -e " \n${GREEN}${DOCS_FQDN} is live${NC} \n"
33
+
34
+ # For all other branches
35
+ else
36
+ echo -e " \n${GREEN} Nothing to upload in >>${BRANCH} << branch.${NC} \n"
37
+ fi
You can’t perform that action at this time.
0 commit comments