Skip to content

Commit

Permalink
Build: Replace "release" with "build" in script for building a package (
Browse files Browse the repository at this point in the history
#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
  • Loading branch information
ocean90 committed Jun 12, 2020
1 parent 0d96318 commit d99dc47
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion bin/build-plugin-zip.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion docs/contributors/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions docs/contributors/release.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
Expand Down

0 comments on commit d99dc47

Please sign in to comment.