Skip to content

Commit

Permalink
Better release script
Browse files Browse the repository at this point in the history
Summary: Automatically tags and publish them upstream, less steps required in order to do the release rather than just `bump-oss-version.js`

Differential Revision: D3913826

Pulled By: bestander

fbshipit-source-id: 6e023e7ab7b486ff6e6cc8e946f19e10a7ceeef8
  • Loading branch information
grabbou authored and Facebook Github Bot 1 committed Sep 23, 2016
1 parent 23d84c8 commit db06fc6
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 15 deletions.
15 changes: 0 additions & 15 deletions Releases.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,6 @@ git checkout -b <version_you_are_releasing>-stable

node ./scripts/bump-oss-version.js <exact-version_you_are_releasing>
# e.g. node ./scripts/bump-oss-version.js 0.22.0-rc

git push origin <version_you_are_releasing>-stable --follow-tags
# e.g. git push origin 0.22-stable --follow-tags
```

Circle CI will automatically run the tests and publish to npm with the version you have specified (e.g `0.22.0-rc`) and tag `next` meaning that this version will not be installed for users by default.
Expand Down Expand Up @@ -113,9 +110,6 @@ If everything worked:
```bash
node ./scripts/bump-oss-version.js <exact_version_you_are_releasing>
# e.g. node ./scripts/bump-oss-version.js 0.28.0-rc.1

git push origin version_you_are_releasing-stable --follow-tags
# e.g. git push origin 0.22-stable --follow-tags
````

-------------------
Expand Down Expand Up @@ -145,15 +139,6 @@ If everything worked:
```bash
node ./scripts/bump-oss-version.js <exact_version_you_are_releasing>
# e.g. node ./scripts/bump-oss-version.js 0.22.0
git tag -d latest
git push origin :latest
git tag latest
# The latest tag marks when to regenerate the website.
git push origin version_you_are_releasing-stable --follow-tags
# e.g. git push origin 0.22-stable --follow-tags
```

#### Update the release notes
Expand Down
13 changes: 13 additions & 0 deletions scripts/bump-oss-version.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,5 +76,18 @@ if (exec(`git tag v${version}`).code) {
exit(1);
}

// Push newly created tag
exec(`git push origin v${version}`);

// Tag latest if doing stable release
if (version.indexOf(`rc`) === -1) {
exec(`git tag -d latest`);
exec(`git push origin :latest`);
exec(`git tag latest`);
exec(`git push origin latest`);
}

exec(`git push origin ${branch} --follow-tags`);

exit(0);
/*eslint-enable no-undef */

0 comments on commit db06fc6

Please sign in to comment.