Fix issue of not setting metadata correctly for generated docs 27/20427/1
authorFatih Degirmenci <fatih.degirmenci@ericsson.com>
Tue, 6 Sep 2016 09:27:42 +0000 (11:27 +0200)
committerFatih Degirmenci <fatih.degirmenci@ericsson.com>
Tue, 6 Sep 2016 09:27:42 +0000 (11:27 +0200)
Removed if clause does not return any html file, causing setmeta
to not run which in turn causes people to see cached versions of
the generated documents instead of the latest generated documents.

This is a quick fix in order to unblock Brady.

Change-Id: Id692781ee8713007b5987bf2bf48a6880978a977
Signed-off-by: Fatih Degirmenci <fatih.degirmenci@ericsson.com>
jjb/releng-macros.yaml

index eb4ee52..2aa775f 100644 (file)
             mv docs_output "$local_path"
             gsutil -m cp -r "$local_path" "gs://$gs_base"
 
-            if gsutil ls "gs://$gs_path" | grep -e 'html$' > /dev/null 2>&1 ; then
-                gsutil -m setmeta \
-                    -h "Content-Type:text/html" \
-                    -h "Cache-Control:private, max-age=0, no-transform" \
-                    "gs://$gs_path"/**.html
-            fi
+            gsutil -m setmeta \
+                -h "Content-Type:text/html" \
+                -h "Cache-Control:private, max-age=0, no-transform" \
+                "gs://$gs_path"/**.html > /dev/null 2>&1
 
             echo "Document link(s):" >> gerrit_comment.txt
             find "$local_path" | grep -e 'index.html$' -e 'pdf$' | \
             mv docs_output "$local_path"
             gsutil -m cp -r "$local_path" "gs://$GS_URL"
 
-            if gsutil ls "gs://$gs_path" | grep -e 'html$' > /dev/null 2>&1 ; then
-                gsutil -m setmeta \
-                    -h "Content-Type:text/html" \
-                    -h "Cache-Control:private, max-age=0, no-transform" \
-                    "gs://$gs_path"/**.html
-            fi
+            gsutil -m setmeta \
+                -h "Content-Type:text/html" \
+                -h "Cache-Control:private, max-age=0, no-transform" \
+                "gs://$gs_path"/**.html > /dev/null 2>&1
 
             echo "Document link(s):" >> gerrit_comment.txt
             find "$local_path" | grep -e 'index.html$' -e 'pdf$' | \