Skip to content

Commit

Permalink
Merge pull request #53 from fastruby/doc/release-steps
Browse files Browse the repository at this point in the history
Doc/release steps
  • Loading branch information
bronzdoc authored Jun 30, 2022
2 parents def285f + bfe11bc commit bae3861
Show file tree
Hide file tree
Showing 3 changed files with 88 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# main [(unreleased)](https://github.com/fastruby/next_rails/compare/v1.0.4...main)

* [FEATURE: Try to find the latest **compatible** version of a gem if the latest version is not compatible with the desired Rails version when checking compatibility](https://github.com/fastruby/next_rails/pull/49)
* [FEATURE: Better documentation for contributing and releasing versions of this gem](https://github.com/fastruby/next_rails/pull/53)

* [FEATURE: Added option --version to get the version of the gem being used](https://github.com/fastruby/next_rails/pull/38)

Expand Down
60 changes: 60 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# Contributing to next_rails

Have a fix for a problem you've been running into or an idea for a new feature you think would be useful? Bug reports and pull requests are welcome on GitHub at [https://github.com/fastruby/next_rails](https://github.com/fastruby/next_rails).

Here's what you need to do:

- Read and understand the [Code of Conduct](https://github.com/fastruby/next_rails/blob/main/CODE_OF_CONDUCT.md).
- Fork this repo and clone your fork to somewhere on your machine.
- [Ensure that you have a working environment](#setting-up-your-environment)
- Read up on [run the tests](#running-all-tests).
- Open a new branch and write a failing test for the feature or bug fix you plan on implementing.
- [Update the changelog when applicable](#a-word-on-the-changelog).
- Push to your fork and submit a pull request.
- [Make sure the test suite passes on GitHub Actions and make any necessary changes to your branch to bring it to green.](#continuous-integration).

## Setting up your environment
To install the dependencies, run:

```bash
bin/setup
```

You can also run `bin/console` for an interactive prompt that will allow you to experiment with the gem.

To install this gem onto your local machine, run:

`bundle exec rake install`.

### Running all tests

To run all of the tests, simply run:

```bash
bundle exec rake
```

## A word on the changelog

You may also notice that we have a changelog in the form of [CHANGELOG.md](CHANGELOG.md). We use a format based on [Keep A Changelog](https://keepachangelog.com/en/1.0.0/).

The important things to keep in mind are:

- If your PR closes any open GitHub issue, make sure you include `Closes #XXXX` in your comment.
- New additions get added under the main (unreleased) heading;
- Attach a link to the PR with the following format:

* [<FEATURE | BUGFIX | CHORE>: Description of changes](github.com/link/to/pr).

## When Submitting a Pull Request:

* If your PR closes any open GitHub issues, please include `Closes #XXXX` in your comment.
* Please include a summary of the change and which issue is fixed or which feature is introduced.
* If changes to the behavior are made, clearly describe what are the changes and why.
* If changes to the UI are made, please include screenshots of the before and after.

## Continuous integration

After opening your Pull Request, please make sure that all tests pass on the CI, to make sure your changes work in all possible environments. GitHub Actions will kick in after you push up a branch or open a PR.

If the build fails, click on a failed job and scroll through its output to verify what is the problem. Push your changes to your branch until the build is green.
27 changes: 27 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,33 @@ The Gemfile.next.lock is initialized with the contents of your existing
Gemfile.lock lock file. We initialize the Gemfile.next.lock to prevent
major version jumps when running the next version of Rails.

## Contributing

Have a fix for a problem you've been running into or an idea for a new feature you think would be useful? Want to see how you can support `next_rails`?

Take a look at the [Contributing document](CONTRIBUTING.md) for instructions to set up the repo on your machine!

## Releases

`next_rails` adheres to [semver](https://semver.org). So given a version number MAJOR.MINOR.PATCH, we will increment the:

1. MAJOR version when you make incompatible API changes,
2. MINOR version when you add functionality in a backwards compatible manner, and
3. PATCH version when you make backwards compatible bug fixes.

Here are the steps to release a new version:

1. Update the `version.rb` file with the proper version number
2. Update `CHANGELOG.md` to have the right headers
3. Commit your changes to a `release/v-1-1-0` branch
4. Push your changes and submit a pull request
5. Merge your pull request to the `main` branch
6. Git tag the latest version of the `main` branch (`git tag v1.1.0`)
7. Push tags to GitHub (`git push --tags`)
8. Build the gem (`gem build next_rails.gemspec`)
9. Push the .gem package to Rubygems.org (`gem push next_rails-1.1.0.gem`)
10. You are all done!

## License

The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).

0 comments on commit bae3861

Please sign in to comment.