1 | 'use strict';
|
2 | const binBuild = require('bin-build');
|
3 | const log = require('logalot');
|
4 | const bin = require('.');
|
5 |
|
6 | bin.run(['--verbose']).then(() => {
|
7 | log.success('guetzli pre-build test passed successfully');
|
8 | }).catch(error => {
|
9 | log.warn(error.message);
|
10 | log.warn('guetzli pre-build test failed');
|
11 | log.info('compiling from source');
|
12 |
|
13 | binBuild.url('https://github.com/google/guetzli/archive/v1.0.1.tar.gz', [
|
14 | `mkdir -p ${bin.dest()}`,
|
15 | `make && mv bin/Release/${bin.use()} ${bin.path()}`
|
16 | ]).then(() => {
|
17 | log.success('guetzli built successfully');
|
18 | }).catch(error => {
|
19 | log.error(error.stack);
|
20 | });
|
21 | });
|