Commit 4e5a9ee4 authored by Łukasz Nowak's avatar Łukasz Nowak

stack/caucase: Fix md5 change detection

The python snippet has to print calculated value.

This fixes commit 7d7a59d6
stack/cacuase: Make rerequest updatable
parent 8c16466a
Pipeline #17148 failed with stage
in 0 seconds
...@@ -15,4 +15,4 @@ ...@@ -15,4 +15,4 @@
[caucase-jinja2-library] [caucase-jinja2-library]
filename = caucase.jinja2.library filename = caucase.jinja2.library
md5sum = 27aba89543032f3c7026ab566f3aa41b md5sum = b3ee1414719f8a24790ae324ca023066
...@@ -133,7 +133,7 @@ recipe = plone.recipe.command ...@@ -133,7 +133,7 @@ recipe = plone.recipe.command
checksum-file = '{{ template }}.md5' checksum-file = '{{ template }}.md5'
command = command =
set -e set -e
md5_current=$(${buildout:executable} -c "import hashlib ; hashlib.md5(open('{{ template }}', 'rb').read()).hexdigest()") md5_current=$(${buildout:executable} -c "import hashlib ; print hashlib.md5(open('{{ template }}', 'rb').read()).hexdigest()")
md5_old=$([ -f ${:checksum-file} ] && cat ${:checksum-file} || echo none) md5_old=$([ -f ${:checksum-file} ] && cat ${:checksum-file} || echo none)
if [ "$md5_current" != "$md5_old" ] || [ ! -f '{{ csr }}' ] || [ ! -f '{{ key }}' ] ; then if [ "$md5_current" != "$md5_old" ] || [ ! -f '{{ csr }}' ] || [ ! -f '{{ key }}' ] ; then
'{{ buildout_bin_directory }}/caucase-rerequest' --template '{{ template }}' --csr '{{ csr }}' --key '{{ key }}' '{{ buildout_bin_directory }}/caucase-rerequest' --template '{{ template }}' --csr '{{ csr }}' --key '{{ key }}'
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment