Skip to content

Commit

Permalink
Bundle source (#22)
Browse files Browse the repository at this point in the history
  • Loading branch information
1000ch authored May 31, 2020
1 parent 186ab14 commit b678b02
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion lib/install.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
'use strict';
const path = require('path');
const binBuild = require('bin-build');
const log = require('logalot');
const bin = require('.');
Expand All @@ -11,7 +12,7 @@ bin.run(['-version']).then(() => {
log.info('compiling from source');

try {
await binBuild.url('https://downloads.sourceforge.net/project/pmt/pngcrush/1.8.13/pngcrush-1.8.13.zip', [
await binBuild.file(path.resolve(__dirname, '../vendor/source/pngcrush-1.8.13.tar.gz'), [
`mkdir -p ${bin.dest()}`,
`make && mv ${bin.use()} ${bin.path()}`
]);
Expand Down
2 changes: 1 addition & 1 deletion test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const pngcrush = require('..');
test('rebuild the pngcrush binaries', async t => {
const temporary = tempy.directory();

await binBuild.url('https://downloads.sourceforge.net/project/pmt/pngcrush/1.8.13/pngcrush-1.8.13.zip', [
await binBuild.file(path.resolve(__dirname, '../vendor/source/pngcrush-1.8.13.tar.gz'), [
`mkdir -p ${temporary}`,
`make && mv pngcrush ${path.join(temporary, 'pngcrush')}`
]);
Expand Down
Binary file added vendor/source/pngcrush-1.8.13.tar.gz
Binary file not shown.

0 comments on commit b678b02

Please sign in to comment.