Skip to content

Commit

Permalink
fix: add LICENSE file into the published package (#1305)
Browse files Browse the repository at this point in the history
  • Loading branch information
markov00 committed Aug 16, 2021
1 parent 640b737 commit 54520f0
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
7 changes: 7 additions & 0 deletions .releaserc.js
Expand Up @@ -14,6 +14,13 @@ module.exports = {
'@semantic-release/commit-analyzer',
'@semantic-release/release-notes-generator',
'@semantic-release/changelog',
[
'@semantic-release/exec',
{
prepareCmd: 'node ./packages/charts/scripts/move_txt_files.js',
execCwd: '.',
},
],
'@semantic-release/github',
[
'@semantic-release/npm',
Expand Down
3 changes: 1 addition & 2 deletions package.json
Expand Up @@ -55,8 +55,7 @@
"typecheck:src": "lerna run --loglevel=silent --scope @elastic/charts typecheck --stream --no-prefix",
"typecheck:all": "tsc -p ./tsconfig.json --noEmit",
"ts:prune": "ts-prune",
"link:kibana": "node ./packages/link_kibana",
"postversion": "node ./packages/charts/scripts/move_txt_files.js"
"link:kibana": "node ./packages/link_kibana"
},
"devDependencies": {
"@babel/core": "^7.10.4",
Expand Down
4 changes: 4 additions & 0 deletions packages/charts/scripts/move_txt_files.js
Expand Up @@ -8,7 +8,11 @@

const fs = require('fs');

console.log('Copying text files to package destination folder...');

fs.copyFileSync('README.md', './packages/charts/README.md');
fs.copyFileSync('LICENSE.txt', './packages/charts/LICENSE.txt');
fs.copyFileSync('NOTICE.txt', './packages/charts/NOTICE.txt');
fs.copyFileSync('CHANGELOG.md', './packages/charts/CHANGELOG.md');

console.log('Done!');

0 comments on commit 54520f0

Please sign in to comment.