|
1 | | -module.exports = function( Release, complete ) { |
| 1 | +module.exports = function( Release, files, complete ) { |
2 | 2 |
|
3 | 3 | var |
4 | 4 | fs = require( "fs" ), |
5 | 5 | shell = require( "shelljs" ), |
6 | 6 | pkg = require( Release.dir.repo + "/package.json" ), |
7 | | - distRemote = Release.remote.replace( "jquery.git", "jquery-dist.git" ), |
| 7 | + distRemote = Release.remote |
| 8 | + |
| 9 | + // For local and github dists |
| 10 | + .replace( /jquery(\.git|$)/, "jquery-dist$1" ), |
8 | 11 |
|
9 | 12 | // These files are included with the distribution |
10 | | - files = [ |
| 13 | + extras = [ |
11 | 14 | "src", |
12 | 15 | "LICENSE.txt", |
13 | 16 | "AUTHORS.txt", |
@@ -54,17 +57,13 @@ module.exports = function( Release, complete ) { |
54 | 57 | // Copy dist files |
55 | 58 | var distFolder = Release.dir.dist + "/dist"; |
56 | 59 | shell.mkdir( "-p", distFolder ); |
57 | | - [ |
58 | | - "dist/jquery.js", |
59 | | - "dist/jquery.min.js", |
60 | | - "dist/jquery.min.map" |
61 | | - ].forEach( function( file ) { |
62 | | - shell.cp( Release.dir.repo + "/" + file, distFolder ); |
| 60 | + files.forEach( function( file ) { |
| 61 | + shell.cp( "-f", Release.dir.repo + "/" + file, distFolder ); |
63 | 62 | } ); |
64 | 63 |
|
65 | 64 | // Copy other files |
66 | | - files.forEach( function( file ) { |
67 | | - shell.cp( "-r", Release.dir.repo + "/" + file, Release.dir.dist ); |
| 65 | + extras.forEach( function( file ) { |
| 66 | + shell.cp( "-rf", Release.dir.repo + "/" + file, Release.dir.dist ); |
68 | 67 | } ); |
69 | 68 |
|
70 | 69 | // Write generated bower file |
|
0 commit comments