File info: autotune build - kavyasukumar/shenanigans GitHub Wiki
autotune-build
is an executable file that builds the static site. Usually a shell script, but could be python, ruby or whatevs.
It should...
- Read the data from
/dev/stdin
. - Make the configuration data available to the project.
- Build the project.
Configuration is available to this file via standard input. Eg: DATA=$(</dev/stdin)
Make sure that the file has execution permission.
chmod +x autotune-build
Middleman blueprint build file
Example#!/bin/bash
BUILD_COMMAND="bundle exec middleman build"
INPUT_DATA=$(</dev/stdin)
SAVE_DATA_TO=data/autotune.json
echo "Saving autotune data to $SAVE_DATA_TO"
mkdir -p `dirname $SAVE_DATA_TO`
echo "$INPUT_DATA" > $SAVE_DATA_TO
$BUILD_COMMAND