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

Commit

Permalink
Add pre-publishing script and bump version to 2.0.0-rc1 (#494)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
ryelle authored Mar 15, 2019
1 parent b0791c1 commit 52ffc10
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ jobs:
php: 7.1
script:
- composer install
- composer run-script phpcs .
- npm install
- npm run lint
- npm run build
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@woocommerce/block-library",
"title": "WooCommerce Blocks",
"author": "Automattic",
"version": "2.0.0-beta",
"version": "2.0.0-rc1",
"description": "WooCommerce blocks for the Gutenberg editor.",
"homepage": "https://github.com/woocommerce/woocommerce-gutenberg-products-block/",
"keywords": [
Expand All @@ -16,9 +16,11 @@
},
"license": "GPL-3.0+",
"scripts": {
"prepack": "npm install && npm run lint && npm run test && npm run build",
"build": "cross-env BABEL_ENV=default NODE_ENV=production webpack",
"start": "cross-env BABEL_ENV=default webpack --watch",
"lint": "npm run lint:css && npm run lint:js",
"lint": "npm run lint:php && npm run lint:css && npm run lint:js",
"lint:php": "composer run-script phpcs .",
"lint:css": "stylelint assets/css",
"lint:js": "eslint assets/js --ext=js,jsx",
"test": "wp-scripts test-unit-js --config tests/js/jest.config.json",
Expand Down
4 changes: 2 additions & 2 deletions woocommerce-gutenberg-products-block.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Plugin Name: WooCommerce Blocks
* Plugin URI: https://github.com/woocommerce/woocommerce-gutenberg-products-block
* Description: WooCommerce blocks for the Gutenberg editor.
* Version: 2.0.0-beta
* Version: 2.0.0-rc1
* Author: Automattic
* Author URI: https://woocommerce.com
* Text Domain: woo-gutenberg-products-block
Expand All @@ -15,7 +15,7 @@

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

define( 'WGPB_VERSION', '2.0.0-beta' );
define( 'WGPB_VERSION', '2.0.0-rc1' );
define( 'WGPB_PLUGIN_FILE', __FILE__ );
define( 'WGPB_ABSPATH', dirname( WGPB_PLUGIN_FILE ) . '/' );

Expand Down

0 comments on commit 52ffc10

Please sign in to comment.