Skip to content
This repository has been archived by the owner on Sep 5, 2020. It is now read-only.

Commit

Permalink
md5 checksum platform compatibiliy
Browse files Browse the repository at this point in the history
  • Loading branch information
Luca Zeug committed Mar 3, 2017
1 parent b2adcf7 commit 1f52c6c
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion gulpTasks/publishing.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,24 @@ gulp.task('checksums', (cb) => {

const files = fs.readdirSync(releasePath);

// mac uses md5, whereas linux and window use md5sum
let command;
let argument;

switch (process.platform) {
case 'darwin':
command = 'md5';
break;
case 'win32':
command = 'certUtil -hashfile';
argument = 'md5';
break;
default:
command = 'md5sum';
}

files.forEach((file) => {
const sum = shell.exec(`md5 "${file}"`, {
const sum = shell.exec(`${command} "${file}" ${argument}`, {
cwd: releasePath
});

Expand Down

0 comments on commit 1f52c6c

Please sign in to comment.