Skip to content
This repository was archived by the owner on Oct 15, 2020. It is now read-only.

Commit b4e78a5

Browse files
committed
add build env support; Jekyll needs JEKYLL_ENV for production
1 parent 955d359 commit b4e78a5

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

files/build_deploy.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,23 +54,29 @@
5454

5555
builder_info = {
5656
'middleman': {
57+
'build_env': {},
5758
'build_command': ['bundle', 'exec', 'middleman', 'build', '--verbose'],
5859
'build_subdir': 'build',
5960
'deploy_command': ['bundle', 'exec', 'middleman', 'deploy', '--no-build-before']
6061
},
6162
# Duck: we had an incomplete build for Pulp (new post but blog index not updated)
6263
# disabling --incremental mode for now
6364
'jekyll': {
65+
'build_env': {
66+
'JEKYLL_ENV': 'production'
67+
},
6468
'build_command': ['bundle', 'exec', 'jekyll', 'build', '--verbose', '--trace'],
6569
'build_subdir': '_site',
6670
'deploy_command': None
6771
},
6872
'ascii_binder': {
73+
'build_env': {},
6974
'build_command': ['bundle', 'exec', 'asciibinder', 'package', '--site=main', '--log-level=debug'],
7075
'build_subdir': '_package/main',
7176
'deploy_command': None
7277
},
7378
'planet': {
79+
'build_env': {},
7480
'build_command': ['/srv/builder/planet-venus/planet.py', '-v', 'planet.ini'],
7581
'build_subdir': 'build',
7682
'deploy_command': None
@@ -335,6 +341,10 @@ def do_rsync(source):
335341
pass
336342
notify_error('install', C.output)
337343

344+
# set environment
345+
for env_name, env_value in builder_info[config['builder']]['build_env'].items():
346+
os.environ[env_name] = env_value
347+
338348
try:
339349
command = builder_info[config['builder']]['build_command']
340350
syslog.syslog("Build of {}: {}".format(name, ' '.join(command)))

0 commit comments

Comments
 (0)