@@ -66,24 +66,39 @@ less active when you don't. If you get a new job and get busy, that's alright.
6666
6767Releases should include documentation, git tag, bower package preparation and
6868finally the actual npm module publish. We have all of this automated by running
69- ` ./tools/release ` from the root of the repository . __ PLEASE DO NOT RUN `npm
70- publish` BY ITSELF__ . The release script will do that. We want to prevent issues
69+ ` npm run release ` . __ PLEASE DO NOT RUN `npm
70+ publish` BY ITSELF__. The ` release- script` will do that. We want to prevent issues
7171like [ #325 ] ( https://github.com/react-bootstrap/react-bootstrap/issues/325 ) and
7272[ #218 ] ( https://github.com/react-bootstrap/react-bootstrap/issues/218 ) from ever
73- happening again. In order to run the release script you will need permission to
73+ happening again. In order to run the ` release- script ` you will need permission to
7474publish the package to npm. Those with this permission are in the [ publishers
7575team] ( https://github.com/orgs/react-bootstrap/teams/publishers )
7676
7777* Note: The publishers team does exist. If you see 404 that means you just have no permissions to publish.*
7878
79- Example usages of the release script:
79+ Example usages of the ` release- script ` :
8080
8181``` bash
82- $ ./tools/release patch
83- $ ./tools/release minor
84- $ ./tools/release major
85- $ ./tools/release minor --preid beta Use both bump and preid for first prerelease
86- $ ./tools/release --preid beta For follow on prereleases of the next version just use this
82+ $ npm run release patch // without " --run" it will run in " dry run" mode
83+ $ npm run release patch -- --run
84+ $ npm run release minor -- --run
85+ $ npm run release major -- --run
86+ $ npm run release minor -- --preid beta --run Use both bump and preid for first prerelease
87+ $ npm run release -- --preid beta --run For follow on prereleases of the next version just use this
88+ ```
89+
90+ * Note additional ` -- ` double-dash. It is important.*
91+
92+ Or if you have this line
93+ ``` sh
94+ export PATH=" ./node_modules/.bin:$PATH "
95+ ```
96+ in your shell config, then you can run it just as:
97+ ``` bash
98+ $ release patch // without " --run" it will run in " dry run" mode
99+ $ release patch --run
100+ $ release minor --preid beta --run
101+ $ release --preid beta --run
87102```
88103
89104Note that the above commands will bump the [ semver] ( http://semver.org ) version
@@ -127,22 +142,33 @@ To live patch the documentation in between release follow these steps
1271420 . Create a new branch from there (for example ` git checkout -b docs/v0.22.1 ` )
1281430 . Cherry-pick the commits you want to include in the live update
129144` git cherry-pick <commit-ish>... `
130- 0 . Use the release-docs script to push and tag to the documentation repository.
145+ 0 . Use the
146+ ``` bash
147+ $ npm run release -- --only-docs --run
148+ // or
149+ $ release --only-docs --run
150+ ```
151+ to push and tag to the documentation repository.
131152
132153* Note: The branch name you checkout to cherry-picked the commit is not enforced.
133154Though keeping similar names ex: ` docs/<version> ` helps finding the branch
134155easily.*
135156
136- Example usage of release-docs script:
137-
138- ``` bash
139- $ ./tools/release-docs
140- ```
141157
142158### Check everything is OK before releasing
143159
144- Release tools have a very useful option ` --dry-run ` .
160+ Release tools are run in "dry run" mode by default.
161+ It prevents ` danger ` steps (` git push ` , ` npm publish ` etc) from accidental running.
145162
146163You can use it
147164- to learn how releasing tools are working.
148165- to ensure there are no side issues before you release anything.
166+ ``` bash
167+ $ npm run release -- --only-docs
168+ $ npm run release major
169+ $ npm run release minor -- --preid beta
170+ // or
171+ $ release --only-docs
172+ $ release major
173+ $ release minor --preid beta
174+ ```
0 commit comments