Commit f809c558 authored by Łukasz Nowak's avatar Łukasz Nowak

fix "stack/caucase: Fix md5 change detection"

Make the md5 detection fix python3 compatible.

Fixes 4e5a9ee4
parent 3c52286b
...@@ -15,4 +15,4 @@ ...@@ -15,4 +15,4 @@
[caucase-jinja2-library] [caucase-jinja2-library]
filename = caucase.jinja2.library filename = caucase.jinja2.library
md5sum = b3ee1414719f8a24790ae324ca023066 md5sum = a5c7a46c6fb85aa22a371d9d2cd9e57e
...@@ -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 ; print hashlib.md5(open('{{ template }}', 'rb').read()).hexdigest()") md5_current=$(${buildout:executable} -c "from __future__ import print_function ; 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