Commit d1ceceec authored by Jérome Perrin's avatar Jérome Perrin

software/ors-amarisoft: use slapos.recipe.build to create gadget folder

This was depending on a side effect of slapos.recipe.template of
creating the intermediate folder structure so that it is here for
subsequent slapos.recipe.build:download sections

Using slapos.recipe.build it is a bit more explit
parent cd17a97d
...@@ -82,8 +82,17 @@ recipe = slapos.recipe.build:download ...@@ -82,8 +82,17 @@ recipe = slapos.recipe.build:download
url = ${:_profile_base_location_}/config/${:_buildout_section_name_} url = ${:_profile_base_location_}/config/${:_buildout_section_name_}
[gadget] [gadget]
recipe = slapos.recipe.template # creates `gadget` folder and downloads renderjs.js
output = ${buildout:directory}/${:_buildout_section_name_}/renderjs.js recipe = slapos.recipe.build
install =
import os
if not os.path.exists(location):
os.mkdir(location)
with open(self.download(options['url'], options['md5sum'])) as src, \
open(options['output'], 'w') as dst:
dst.write(src.read())
location = ${buildout:directory}/${:_buildout_section_name_}
output = ${:location}/renderjs.js
url = https://lab.nexedi.com/nexedi/renderjs/raw/b715d066bfddc30bedfc8356fb720dcbb391378e/dist/renderjs-0.28.0.js url = https://lab.nexedi.com/nexedi/renderjs/raw/b715d066bfddc30bedfc8356fb720dcbb391378e/dist/renderjs-0.28.0.js
md5sum = 7e074a29b07e0045d2ba8a8e63bd499e md5sum = 7e074a29b07e0045d2ba8a8e63bd499e
...@@ -103,7 +112,7 @@ inline = ...@@ -103,7 +112,7 @@ inline =
[copy-gadget-to-software] [copy-gadget-to-software]
recipe = slapos.recipe.build:download recipe = slapos.recipe.build:download
url = ${:_profile_base_location_}/gadget/${:_buildout_section_name_} url = ${:_profile_base_location_}/gadget/${:_buildout_section_name_}
destination = ${buildout:directory}/gadget/${:_buildout_section_name_} destination = ${gadget:location}/${:_buildout_section_name_}
[enb.jinja2.cfg] [enb.jinja2.cfg]
<= copy-config-to-instance <= copy-config-to-instance
......
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