From 226c0b4318e4da8ddc6e61e1a1b6cdffee9dd140 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ricardo=20Gra=C3=A7a?= Date: Sun, 18 Nov 2018 17:39:46 +0000 Subject: [PATCH] Generate docs before committing when publishing --- .github/CONTRIBUTING.md | 3 ++- scripts/postpublish.sh | 12 +++++------- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index e8f1f077..25f31499 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -233,5 +233,6 @@ just make sure to follow the process explained below in the correct order. shouldn't publish it yet, but just save it as a draft instead. 2. Update the `CHANGELOG.md` file and update the version number of `package.json`. For the changelog just follow the format of the previous update. In general you should link to PRs instead of issues when mentioning changes. If the PRs' -descriptions are well written they should already include any associated issues. At this point there is no need to commit and/or push these changes since that is taken care of automatically by the release scripts. +descriptions are well written they should already include any associated issues. At this point there is no need to +commit and/or push these changes since that is taken care of automatically by the release scripts. 3. Just run `npm publish` and sit back. diff --git a/scripts/postpublish.sh b/scripts/postpublish.sh index 98555fcb..de298cf8 100755 --- a/scripts/postpublish.sh +++ b/scripts/postpublish.sh @@ -11,17 +11,15 @@ echo "(Re)Creating bookshelf-source remote" git remote remove bookshelf-source || true git remote add bookshelf-source git@github.com:bookshelf/bookshelf.git -echo "Committing new release version w/ any outstanding changes" +echo "Regenerating documentation" +npm run jsdoc + +echo "Committing new release version ($version) w/ any outstanding changes" git commit -am "Release $version" echo "Tagging version w/ number" git tag $version -echo "Pushing commit to source master" +echo "Pushing commit and tags to source master" git push bookshelf-source master - -echo "Pushing new version tag to source master" git push bookshelf-source master --tags - -echo "Running gh-pages publish" -npm run jsdoc