From d99dc47f139b2107eb2c8a75e89e5fb1d55dbc78 Mon Sep 17 00:00:00 2001 From: Dominik Schilling Date: Fri, 12 Jun 2020 13:13:47 +0200 Subject: [PATCH] Build: Replace "release" with "build" in script for building a package (#23063) * Replace "release" with "build" when building a package * Rename npm script to build:plugin-zip * Use the npm alias for building the plugin ZIP to make it easier to replace the underlying script without the need to update the docs --- bin/build-plugin-zip.sh | 2 +- docs/contributors/getting-started.md | 2 +- docs/contributors/release.md | 4 ++-- package.json | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/bin/build-plugin-zip.sh b/bin/build-plugin-zip.sh index 26ef45f7b337f..059df8063f292 100755 --- a/bin/build-plugin-zip.sh +++ b/bin/build-plugin-zip.sh @@ -26,7 +26,7 @@ warning () { echo -e "\n${YELLOW_BOLD}$1${COLOR_RESET}\n" } -status "💃 Time to release Gutenberg 🕺" +status "💃 Time to build the Gutenberg plugin ZIP file 🕺" if [ -z "$NO_CHECKS" ]; then # Make sure there are no changes in the working tree. Release builds should be diff --git a/docs/contributors/getting-started.md b/docs/contributors/getting-started.md index 3516e4951a84d..72f99c7f9551b 100644 --- a/docs/contributors/getting-started.md +++ b/docs/contributors/getting-started.md @@ -65,7 +65,7 @@ To build: open a terminal (or if on Windows, a command prompt) and navigate to t After building the cloned gutenberg directory contains the complete plugin, you can upload the entire repository to your `wp-content/plugins` directory and activate the plugin from the WordPress admin. -Another way to upload after building is to run `npm run package-plugin` to create a plugin zip file — this requires `bash` and `php` to run. The script creates `gutenberg.zip` that you can use to install Gutenberg through the WordPress admin. +Another way to upload after building is to run `npm run build:plugin-zip` to create a plugin zip file — this requires `bash` and `php` to run. The script creates `gutenberg.zip` that you can use to install Gutenberg through the WordPress admin. ## Storybook diff --git a/docs/contributors/release.md b/docs/contributors/release.md index c9c66364bc251..3b791b1340570 100644 --- a/docs/contributors/release.md +++ b/docs/contributors/release.md @@ -105,7 +105,7 @@ git push origin release/x.x 1. Run `git fetch --tags`. 2. Check out the tag for this release, you should run `git checkout vx.x.0-rc.1`. -3. Run `./bin/build-plugin-zip.sh` from the root of project. This packages a zip file with a release build of `gutenberg.zip`. +3. Run `npm run build:plugin-zip` from the root of project. This packages a zip file with a release build of `gutenberg.zip`. ##### Publish the Release on GitHub @@ -171,7 +171,7 @@ Creating a release involves: 1. Run `git fetch --tags`. 2. Check out the tag for this release, you should run `git checkout vx.x.0`. -3. Run `./bin/build-plugin-zip.sh` from the root of project. This packages a zip file with a release build of `gutenberg.zip`. +3. Run `npm run build:plugin-zip` from the root of project. This packages a zip file with a release build of `gutenberg.zip`. ##### Publish the Release on GitHub diff --git a/package.json b/package.json index 6e75dd34d2448..b8f2c4fd4511a 100644 --- a/package.json +++ b/package.json @@ -195,6 +195,7 @@ "prebuild:packages": "npm run clean:packages && lerna run build", "build:packages": "npm run build:package-types && node ./bin/packages/build.js", "build:package-types": "node ./bin/packages/validate-typescript-version.js && tsc --build", + "build:plugin-zip": "./bin/build-plugin-zip.sh", "build": "npm run build:packages && wp-scripts build", "changelog": "./bin/plugin/cli.js changelog", "check-engines": "wp-scripts check-engines", @@ -220,7 +221,6 @@ "lint-css:fix": "npm run lint-css -- --fix", "lint:md-js": "wp-scripts lint-md-js", "lint:md-docs": "wp-scripts lint-md-docs", - "package-plugin": "./bin/build-plugin-zip.sh", "pot-to-php": "./bin/pot-to-php.js", "publish:check": "lerna updated", "publish:dev": "npm run clean:package-types && npm run build:packages && lerna publish --dist-tag next",