Renamed the script 'deploy' to 'release'
This commit is contained in:
parent
e32a456966
commit
cf9b35bb4d
4 changed files with 10 additions and 10 deletions
|
@ -1,5 +1,5 @@
|
||||||
if (process.env.THEATRE_IS_PUBLISHING !== 'true') {
|
if (process.env.THEATRE_IS_PUBLISHING !== 'true') {
|
||||||
throw Error(
|
throw Error(
|
||||||
`This script may run only when the "deploy" command in monorepo's root is running.`,
|
`This script may run only when the "release" command in monorepo's root is running.`,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
"build:ts": "tsc --build ./devEnv/typecheck-all-projects/tsconfig.all.json",
|
"build:ts": "tsc --build ./devEnv/typecheck-all-projects/tsconfig.all.json",
|
||||||
"test": "jest",
|
"test": "jest",
|
||||||
"postinstall": "husky install",
|
"postinstall": "husky install",
|
||||||
"deploy": "zx scripts/deploy.mjs",
|
"release": "zx scripts/release.mjs",
|
||||||
"build:api-docs": "zx scripts/build-api-docs.mjs",
|
"build:api-docs": "zx scripts/build-api-docs.mjs",
|
||||||
"lint:all": "eslint . --ext ts,tsx --ignore-path=.gitignore --rulesdir ./devEnv/eslint/rules"
|
"lint:all": "eslint . --ext ts,tsx --ignore-path=.gitignore --rulesdir ./devEnv/eslint/rules"
|
||||||
},
|
},
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
/**
|
/**
|
||||||
* The deploy script. This must be called with zx from the repo's root.
|
* The release script. This must be called with zx from the repo's root.
|
||||||
* Example:
|
* Example:
|
||||||
* ```
|
* ```
|
||||||
* $ cd /path/to/repo
|
* $ cd /path/to/repo
|
||||||
* $ yarn run deploy 0.4.2
|
* $ yarn run release 0.4.2
|
||||||
* ```
|
* ```
|
||||||
*/
|
*/
|
||||||
import path from 'path'
|
import path from 'path'
|
||||||
|
@ -48,7 +48,7 @@ const packagesWhoseVersionsShouldBump = [
|
||||||
|
|
||||||
;(async function () {
|
;(async function () {
|
||||||
// our packages will check for this env variable to make sure their
|
// our packages will check for this env variable to make sure their
|
||||||
// prepublish script is only called from the `$ cd /path/to/monorepo; yarn run deploy`
|
// prepublish script is only called from the `$ cd /path/to/monorepo; yarn run release`
|
||||||
// @ts-ignore ignore
|
// @ts-ignore ignore
|
||||||
process.env.THEATRE_IS_PUBLISHING = true
|
process.env.THEATRE_IS_PUBLISHING = true
|
||||||
|
|
||||||
|
@ -78,7 +78,7 @@ const packagesWhoseVersionsShouldBump = [
|
||||||
const version = argv._[argv._.length - 1]
|
const version = argv._[argv._.length - 1]
|
||||||
if (typeof version !== 'string') {
|
if (typeof version !== 'string') {
|
||||||
console.error(
|
console.error(
|
||||||
`You need to specify a version, like: $ yarn deploy 1.2.0-rc.4`,
|
`You need to specify a version, like: $ yarn release 1.2.0-rc.4`,
|
||||||
)
|
)
|
||||||
process.exit(1)
|
process.exit(1)
|
||||||
} else if (!version.match(/^[0-9]+\.[0-9]+\.[0-9]+(\-(dev|rc)\.[0-9]+)?$/)) {
|
} else if (!version.match(/^[0-9]+\.[0-9]+\.[0-9]+(\-(dev|rc)\.[0-9]+)?$/)) {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
## How to deploy
|
## How to release
|
||||||
|
|
||||||
Simply update the version of `theatre/package.json`, then run `$ yarn run deploy`. This script will:
|
Simply update the version of `theatre/package.json`, then run `$ yarn run release`. This script will:
|
||||||
1. Update the version of `@theatre/core` and `@theatre/studio`.
|
1. Update the version of `@theatre/core` and `@theatre/studio` and other dependencies.
|
||||||
2. Bundle the `.js` and `.dts` files.
|
2. Bundle the `.js` and `.dts` files.
|
||||||
3. Publish both packages to npm.
|
3. Publish all packages to npm.
|
Loading…
Reference in a new issue