Skip to content

Commit

Permalink
Add release instructions (not-an-aardvark#223)
Browse files Browse the repository at this point in the history
* Added CircleCI for building and linting (not-an-aardvark#222)

* Fix indentation

* Fix deploy script for local running

* Add release instructions

* Add pushing-to-github instructions
  • Loading branch information
not-an-aardvark authored Oct 18, 2019
1 parent 78e508f commit bbc5f65
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
4 changes: 1 addition & 3 deletions scripts/deploy/deploy_docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
set -e

REPO=`git config remote.origin.url`
SSH_REPO=${REPO/https:\/\/github.com\//git@github.com:}

rm -rf doc/ || true
git clone $REPO --branch gh-pages --single-branch --depth 1 doc
scripts/build_docs.sh
Expand All @@ -13,4 +11,4 @@ cd doc/
git add -A
git commit -m "Docs for v$(npm info .. version)"

git push $SSH_REPO $TARGET_BRANCH
git push origin gh-pages
16 changes: 16 additions & 0 deletions src/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,3 +121,19 @@ Most content constructors (`Comment`, `Submission`, etc.) are subclasses of the
`RedditContent` instances carry shortcut functions such as `_get`, `_post`, etc. These do the same thing as the corresponding functions on the snoowrap prototype.

`RedditContent` objects also have a `_fetch` property. This starts out as `null` when the object is created, and gets set to a Promise and returned when `fetch()` is called for the first time. All subsequent calls to `fetch()` return the same Promise. This ensures that no objects get fetched more than once (unless it is explicitly re-fetched using `refresh()`).

## Releases

To do a release:

1. Decide on the version number of the new release, based on the changes since the last release.
1. Prepare the package for the release:
* Update the `version` field in `package.json`
* Update the `VERSION` constant in `src/constants.js`
* Add a new entry to `CHANGELOG.md` describing the release
* Run `npm run bundle-size` and update `README.md` with the new size of `snoowrap-v1.min.js` in the "Browsers" section, if needed. (This doesn't need to be kept up to date every release, but running it once in a while is nice to make sure the advertised size isn't wildly off.)
1. Consider running `npm test`, or making sure the latest build on master is passing.
1. Run `npm publish` to publish the package to npm.
1. Push the released to GitHub (`git commit` followed by `git push`)
1. Create a tag for the release (e.g. `git tag v1.20.0`) and push the tag to GitHub (`git push --tag`)
1. To update the docs website and the browser build, run `scripts/deploy/deploy_docs.sh`. Note that this script will create a git commit and push it to GitHub.

0 comments on commit bbc5f65

Please sign in to comment.