3 export PATH=$PATH:/usr/local/bin/
5 git_sha1="$(git rev-parse HEAD)"
6 docu_build_date="$(date)"
9 while read -r -d ''; do
11 done < <(find * -type f -iname '*.rst' -print0)
13 for file in "${{files[@]}}"; do
15 file_cut="${{file%.*}}"
16 gs_cp_folder="${{file_cut}}"
19 sed -i "s/_sha1_/$git_sha1/g" $file
20 sed -i "s/_date_/$docu_build_date/g" $file
24 rst2html $file | gsutil cp -L gsoutput.txt - \
25 gs://artifacts.opnfv.org/"$project"/"$gs_cp_folder".html
26 gsutil setmeta -h "Content-Type:text/html" \
27 -h "Cache-Control:private, max-age=0, no-transform" \
28 gs://artifacts.opnfv.org/"$project"/"$gs_cp_folder".html
33 rst2pdf $file -o - | gsutil cp -L gsoutput.txt - \
34 gs://artifacts.opnfv.org/"$project"/"$gs_cp_folder".pdf
35 gsutil setmeta -h "Content-Type:application/pdf" \
36 -h "Cache-Control:private, max-age=0, no-transform" \
37 gs://artifacts.opnfv.org/"$project"/"$gs_cp_folder".pdf
44 while read -r -d ''; do
46 done < <(find * -type f \( -iname \*.jpg -o -iname \*.png \) -print0)
48 for img in "${{images[@]}}"; do
50 # uploading found images
52 cat "$img" | gsutil cp -L gsoutput.txt - \
53 gs://artifacts.opnfv.org/"$project"/"$img"
54 gsutil setmeta -h "Content-Type:image/jpeg" \
55 -h "Cache-Control:private, max-age=0, no-transform" \
56 gs://artifacts.opnfv.org/"$project"/"$img"