Skip to content

Commit

Permalink
docs(release): update the release docs in readme
Browse files Browse the repository at this point in the history
  • Loading branch information
TheSharpieOne committed Jun 28, 2018
1 parent 9465670 commit 18eeffe
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 16 deletions.
18 changes: 11 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -220,27 +220,31 @@ npm run test-watch
#### Create Release Branch
To create a release branch and changelog, run the following command with a semantic release type (major, minor, patch):
Note: you must have the `GITHUB_TOKEN` environment variable set to a valid GitHub token with write access to your repo.
```
To create a release branch and changelog, run the following command, optionally with a semantic release type (major, minor, patch) (if not provided, it will default to semver (it's best to let it default)):

```bash
./scripts/release <release-type>
```

Verify changelog in branch. Create a PR if everything looks good. Merge when tests are green.

#### Tagging and Publishing

Note: you must have write permission to this repo do perform this action

Once the release branch is merged, checkout master and run:

```
```bash
./scripts/publish
```

This will build the current state of master, tag it based on the release version and push the tag up to GitHub. If that all looks good, the final command to run is:
This will build the current state of master, tag it based on the release version and push the tag up to GitHub. Travis will detect the new tag and publish to npm.

```
npm publish
```
_OR_

You can create a new tag via the GitHub user interface. If you do it this way, make sure to use the correct version as the tag name (eg. `6.2.0`).

## In the wild

Expand Down
4 changes: 1 addition & 3 deletions scripts/publish
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ error() {
if [ -z "$TRAVIS" ]; then
git checkout master
git pull
npm install
npm run build
fi

if [ -z "$CURRENT_BRANCH" ]; then
Expand All @@ -34,4 +32,4 @@ git tag -a $VERSION -m "release $VERSION"
git push --set-upstream origin $CURRENT_BRANCH > /dev/null 2>&1
git push --tags > /dev/null 2>&1

success "pushed $VERSION tag to GitHub. If everything looks good, run: npm publish"
success "pushed $VERSION tag to GitHub."
6 changes: 0 additions & 6 deletions scripts/release
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,6 @@ VERSION="$(npm version --no-git-tag-version $BUMP_TYPE | sed 's/v//g')"
echo "==> Updating Changelog"
node_modules/.bin/conventional-changelog -i CHANGELOG.md -o CHANGELOG.md -p angular

echo "==> Cleaning Build directory"
rm -rf ./dist

echo "==> Creating build files"
npm run build

echo "==> Committing changes"

git checkout -b "release-$VERSION"
Expand Down

0 comments on commit 18eeffe

Please sign in to comment.