Skip to content

Commit

Permalink
Release script: Add .npmignore and keep .gitignore when creating the tag
Browse files Browse the repository at this point in the history
  • Loading branch information
timmywil committed Nov 15, 2013
1 parent 1f112c9 commit 9b860e9
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 20 deletions.
11 changes: 11 additions & 0 deletions .npmignore
@@ -0,0 +1,11 @@
.editorconfig
.gitattributes
.jscs.json
.jshintignore
.jshintrc
.mailmap
.travis.yml
/build
/speed
/test
/Gruntfile.js
23 changes: 3 additions & 20 deletions build/release.js
Expand Up @@ -303,27 +303,10 @@ function commitDistFiles( next ) {
var pkgClone = readJSON( "package.json" );
delete pkgClone.scripts;
fs.writeFileSync( "package.json", JSON.stringify( pkgClone, null, "\t" ) );
fs.unlinkSync( ".gitignore" );
// Add files to be committed
git( [ "add", "package.json", devFile, minFile, mapFile, sizzleLoc ], function() {
// Remove unneeded files
git( [ "rm", "-r",
"build",
"speed",
"test",
".editorconfig",
".gitattributes",
".gitignore",
".jscs.json",
".jshintignore",
".jshintrc",
".mailmap",
".travis.yml",
"Gruntfile.js",
"README.md"
], function() {
git( [ "commit", "-m", releaseVersion ], next, debug );
}, debug );
// Use force to add normally ignored files
git( [ "add", "-f", "package.json", devFile, minFile, mapFile, sizzleLoc ], function() {
git( [ "commit", "-m", releaseVersion ], next, debug );
}, debug );
}

Expand Down

0 comments on commit 9b860e9

Please sign in to comment.