File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -54,13 +54,20 @@ async function packageUp() {
54
54
fs . mkdirSync ( nodbUtil . RELEASE_DIR , { recursive : true , mode : 0o755 } ) ;
55
55
await copyDir ( nodbUtil . STAGING_DIR , nodbUtil . RELEASE_DIR ) ;
56
56
57
+ // Don't include source code etc. in the npm package. This is
58
+ // done dynamically because .npmignore cannot exclude source code
59
+ // by default otherwise compiling from a GitHub tag or branch
60
+ // won't work.
61
+ fs . appendFileSync ( '.npmignore' , '\n/odpi\n/src\nbinding.gyp\n/package/buildbinary.js\n/package/buildpackage.js\n' ) ;
62
+
57
63
// Build the package
58
64
execSync ( 'npm pack' ) ;
65
+
59
66
} catch ( err ) {
60
67
console . error ( err ) ;
61
68
} finally {
62
- // Undo changes to package.json
63
- execSync ( 'git checkout package.json' ) ;
69
+ // Undo changes to the repo
70
+ execSync ( 'git checkout package.json .npmignore ' ) ;
64
71
}
65
72
}
66
73
You can’t perform that action at this time.
0 commit comments