Skip to content

Commit

Permalink
WIP: Attempt to fix release file copying again
Browse files Browse the repository at this point in the history
  • Loading branch information
c0bra committed Oct 6, 2014
1 parent 80caa79 commit c4ecd01
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions lib/grunt/plugins.js
Original file line number Diff line number Diff line change
Expand Up @@ -252,19 +252,23 @@ module.exports = function(grunt) {

var releasePath = path.join(releaseDir, oldFileName);

grunt.log.writeln('Copying ' + f + ' to ' + releasePath);
// fs.createReadStream(f).pipe(fs.createWriteStream(stablePath));
shell.cp('-f', f, releasePath);
if (path.normalize(f) !== path.normalize(releasePath)) {
grunt.log.writeln('Copying ' + f + ' to ' + releasePath);
// fs.createReadStream(f).pipe(fs.createWriteStream(stablePath));
shell.cp('-f', f, releasePath);
}
}

var newPath = path.join(file.dest, newFileName);

grunt.log.writeln('Copying ' + f + ' to ' + newPath);
// fs.createReadStream(f).pipe(fs.createWriteStream(newPath));
shell.cp('-f', f, newPath);
if (path.normalize(f) !== path.normalize(newPath)) {
grunt.log.writeln('Copying ' + f + ' to ' + newPath);
// fs.createReadStream(f).pipe(fs.createWriteStream(newPath));
shell.cp('-f', f, newPath);
}

if (options.cleanup && f !== newPath) {
grunt.log.writeln('Unlinking ' + f);
if (options.cleanup && path.normalize(f) !== path.normalize(newPath)) {
grunt.log.writeln('Unlinking ' + f, newPath);
shell.rm(f);
}
});
Expand Down

0 comments on commit c4ecd01

Please sign in to comment.