Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release doc #44

Merged
merged 1 commit into from
Mar 15, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# toxiproxy-ruby

[![Gem Version](https://badge.fury.io/rb/toxiproxy.svg)](https://badge.fury.io/rb/toxiproxy)
[![Run tests](https://github.com/Shopify/toxiproxy-ruby/actions/workflows/ci.yml/badge.svg)](https://github.com/Shopify/toxiproxy-ruby/actions/workflows/ci.yml)

`toxiproxy-ruby` `>= 1.x` is compatible with the Toxiproxy `2.x` series.
`toxiproxy-ruby` `0.x` is compatible with the Toxiproxy `1.x` series.

Expand All @@ -9,8 +12,8 @@ ensure your application behaves appropriately under harsh conditions. Before you
can use the Ruby library, you need to read the [Usage section of the Toxiproxy
README](https://github.com/shopify/toxiproxy#usage).

```
gem install toxiproxy
```shell
$ gem install toxiproxy
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Super minor, but I am not a fan of including $ in command output unless we need to distinguish between typed commands and output being presented to the user.

Advantage of not including the $ is that it makes it easier for people to copy pasta the actual command they need (there's a handy "copy this text" button on Github Markdown boxes) without having to manually remove the preceding $.

Copy link
Contributor Author

@miry miry Mar 15, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is that it makes it easier for people to copy pasta

that exactly the reason why I am adding $. to force people to think before copy paste. It has extra visability - show that it is command line.

Copy link
Contributor Author

@miry miry Mar 15, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ideally github should add it automatically for shell code lines. and have empty lines as separation, but it is not supported for now.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok. Aleem on my side :P

```

Make sure the Toxiproxy server is already running.
Expand Down
74 changes: 74 additions & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# Release

## Before You Begin

Ensure your local workstation is configured to be able to
[Sign commits](https://docs.github.com/en/authentication/managing-commit-signature-verification/signing-commits).

## Local Release Preparation

### Checkout latest code

```shell
$ git checkout master
$ git pull origin master
```

### Bump version

Update version in [`lib/toxiproxy/version.rb`](./lib/toxiproxy/version.rb).
Check if there is required changes in [`README.md`](./README.md).

### Run Tests

Make sure all tests passed and gem could be build

```shell
$ rake test
$ rake build
```

### Create Release Commit and Tag

Commit changes and create a tag. Make sure commit and tag are signed.

```shell
$ export RELEASE_VERSION=2.x.y
$ git commit -a -S -m "Release $RELEASE_VERSION"
$ git tag -s "v$RELEASE_VERSION"
```

## Release Tag

On your local machine again, push your tag to the repository.

```shell
$ git push origin "v$RELEASE_VERSION"
```

and only after push changes in `master`:

```shell
$ git push origin master
```

## Verify rubygems release

- Shipit should kick off a build and release after new version detected.
- Check [rubygems](https://rubygems.org/gems/toxiproxy)

## Github release

- Create a new gem
```shell
$ bundle exec rake build
```
- Create github release. Choose either `hub` or `gh`.
* Github CLi [gh_release_create](https://cli.github.com/manual/gh_release_create) :
```
$ gh release create v<version> pkg/toxiproxy-<version>.gem
```
* Hub:
```
$ hub release create -a pkg/toxiproxy-<version>.gem v<version>
```