Skip to content

Commit

Permalink
Modify release script.
Browse files Browse the repository at this point in the history
  • Loading branch information
peterwilsoncc committed Aug 2, 2022
1 parent 52cd3c3 commit 55d7975
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"start": "wp-scripts start",
"test:e2e": "wp-scripts test-e2e",
"test:unit": "wp-scripts test-unit-js",
"release": "wp-scripts build; npm run makepot; npm run build:docs; wp-scripts plugin-zip"
"release": "wp-scripts build; npm run makepot; wp-scripts build --config ./webpack.config.release.js"
},
"files": [
"readme.txt",
Expand Down
35 changes: 35 additions & 0 deletions webpack.config.release.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
const CopyPlugin = require( 'copy-webpack-plugin' );
const { resolve } = require( 'path' );
module.exports = {
entry: {},
output: {
path: resolve( process.cwd(), 'release' ),
clean: true,
},
plugins: [
new CopyPlugin( {
patterns: [
{ from: 'readme.txt', to: './' },
{ from: 'README.md', to: './' },
{ from: 'CHANGELOG.md', to: './' },
{ from: 'composer.json', to: './' },
{ from: 'distributor.php', to: './' },
{ from: '.github/workflows/*', to: './' },
{ from: '.gitattributes', to: './' },
{ from: 'assets/img/*', to: './' },
{ from: 'dist/**/*', to: './' },
{ from: 'includes/**/*', to: './' },
{ from: 'lang/**/*', to: './' },
{ from: 'templates/**/*', to: './' },
{
from: 'vendor/georgestephanis/application-passwords/**/*',
to: './',
},
{
from: 'vendor/yahnis-elsts/plugin-update-checker/**/*',
to: './',
},
],
} ),
],
};

0 comments on commit 55d7975

Please sign in to comment.