Skip to content
This repository was archived by the owner on Feb 23, 2024. It is now read-only.

Commit 52ffc10

Browse files
authored
Add pre-publishing script and bump version to 2.0.0-rc1 (#494)
* Add a `prepack` script to run before publish This will re-install dependencies, run linting on PHP, CSS, and JS, run the JS tests, and lastly build the production bundle. * phpcs is now part of `npm run lint` so we don’t need to run it twice * Version bump to RC1
1 parent b0791c1 commit 52ffc10

File tree

4 files changed

+7
-6
lines changed

4 files changed

+7
-6
lines changed

.travis.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ jobs:
2222
php: 7.1
2323
script:
2424
- composer install
25-
- composer run-script phpcs .
2625
- npm install
2726
- npm run lint
2827
- npm run build

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "@woocommerce/block-library",
33
"title": "WooCommerce Blocks",
44
"author": "Automattic",
5-
"version": "2.0.0-beta",
5+
"version": "2.0.0-rc1",
66
"description": "WooCommerce blocks for the Gutenberg editor.",
77
"homepage": "https://github.com/woocommerce/woocommerce-gutenberg-products-block/",
88
"keywords": [
@@ -16,9 +16,11 @@
1616
},
1717
"license": "GPL-3.0+",
1818
"scripts": {
19+
"prepack": "npm install && npm run lint && npm run test && npm run build",
1920
"build": "cross-env BABEL_ENV=default NODE_ENV=production webpack",
2021
"start": "cross-env BABEL_ENV=default webpack --watch",
21-
"lint": "npm run lint:css && npm run lint:js",
22+
"lint": "npm run lint:php && npm run lint:css && npm run lint:js",
23+
"lint:php": "composer run-script phpcs .",
2224
"lint:css": "stylelint assets/css",
2325
"lint:js": "eslint assets/js --ext=js,jsx",
2426
"test": "wp-scripts test-unit-js --config tests/js/jest.config.json",

woocommerce-gutenberg-products-block.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Plugin Name: WooCommerce Blocks
44
* Plugin URI: https://github.com/woocommerce/woocommerce-gutenberg-products-block
55
* Description: WooCommerce blocks for the Gutenberg editor.
6-
* Version: 2.0.0-beta
6+
* Version: 2.0.0-rc1
77
* Author: Automattic
88
* Author URI: https://woocommerce.com
99
* Text Domain: woo-gutenberg-products-block
@@ -15,7 +15,7 @@
1515

1616
defined( 'ABSPATH' ) || die();
1717

18-
define( 'WGPB_VERSION', '2.0.0-beta' );
18+
define( 'WGPB_VERSION', '2.0.0-rc1' );
1919
define( 'WGPB_PLUGIN_FILE', __FILE__ );
2020
define( 'WGPB_ABSPATH', dirname( WGPB_PLUGIN_FILE ) . '/' );
2121

0 commit comments

Comments
 (0)