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

docs: Release procedure documentation #1649

Merged
merged 9 commits into from
May 27, 2022
Merged
Show file tree
Hide file tree
Changes from 4 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
9 changes: 8 additions & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,19 @@ relevant checkboxes (`[x]`). This will ensure a smooth and quick review process.

<!-- Does your PR require Flame users to manually update their apps to accommodate your change?

If the PR is a breaking change this should be indicated with suffix "!" (for example, `feat!:`, `fix!:`). See [Conventional Commit] for details.
If the PR is a breaking change this should be indicated with suffix "!"
(for example, `feat!:`, `fix!:`). See [Conventional Commit] for details.
-->

- [ ] Yes, this is a breaking change.
- [ ] No, this is *not* a breaking change.

<!-- ### Migration instructions

If the PR is breaking, uncomment this header and add instructions for how to migrate from the
currently released version to the new proposed way.
-->

## Related Issues

<!-- Provide a list of issues related to this PR from the [issue database].
Expand Down
52 changes: 52 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@
**Note:** If these contribution guidelines are not followed your issue or PR might be closed, so
please read these instructions carefully.


## Contribution types

### Bug Reports
- If you find a bug, please first report it using [Github issues].
- First check if there is not already an issue for it; duplicated issues will be closed.


### Bug Fix
- If you'd like to submit a fix for a bug, please read the [How To](#how-to-contribute) for how to
send a Pull Request.
Expand All @@ -17,6 +19,7 @@ please read these instructions carefully.
- Write `Fixes #xxxx` in your PR text, where xxxx is the issue number (if there is one).
- Include a test that isolates the bug and verifies that it was fixed.


### New Features
- If you'd like to add a feature to the library that doesn't already exist, feel free to describe
the feature in a new [GitHub issue].
Expand All @@ -27,12 +30,14 @@ please read these instructions carefully.
with the project objectives at the time.
- Implement the code for the new feature and please read the [How To](#how-to-contribute).


### Documentation & Miscellaneous
- If you have suggestions for improvements to the documentation, tutorial or examples (or something
else), we would love to hear about it.
- As always first file a [Github issue].
- Implement the changes to the documentation, please read the [How To](#how-to-contribute).


## How To Contribute

### Requirements
Expand All @@ -53,13 +58,15 @@ If the contribution doesn't meet these criteria, a maintainer will discuss it wi
or PR. You can still continue to add more commits to the branch you have sent the Pull Request from
and it will be automatically reflected in the PR.


## Open an issue and fork the repository
- If it is a bigger change or a new feature, first of all
[file a bug or feature report][GitHub issues], so that we can discuss what direction to follow.
- [Fork the project][fork guide] on GitHub.
- Clone the forked repository to your local development machine
(e.g. `git clone git@github.com:<YOUR_GITHUB_USER>/flame.git`).


### Environment Setup
Flame uses [Melos] to manage the project and dependencies.

Expand All @@ -82,6 +89,7 @@ command once.

> You do not need to run `flutter pub get` once bootstrap has been completed.


### Performing changes
- Create a new local branch from `main` (e.g. `git checkout -b my-new-feature`)
- Make your changes.
Expand All @@ -90,6 +98,7 @@ command once.
- Push your new branch to your own fork into the same remote branch
(e.g. `git push origin my-username.my-new-feature`, replace `origin` if you use another remote.)


### Open a pull request
Go to the [pull request page of Flame][PRs] and in the top
of the page it will ask you if you want to open a pull request from your newly created branch.
Expand All @@ -114,6 +123,49 @@ Examples of PR titles:
- test: Add infinity test for `MoveEffect.to`
- refactor: Optimize the structure of the game loop


# Maintainers

These instructions are for the maintainers of Flame.

## Merging a pull request

When merging a pull request, make sure that the title of the merge commit has the correct
wolfenrain marked this conversation as resolved.
Show resolved Hide resolved
conventional commit tag and a descriptive title. This is extra important since sometimes the title
of the PR doesn't reflect what GitHub defaults to for the merge commit title (if the title has been
changed during the life time of the PR for example).

All the default text should be removed from the commit message and if the PR is breaking, the
instructions from the "Migration instruction" should be copied into the commit message.
spydon marked this conversation as resolved.
Show resolved Hide resolved
spydon marked this conversation as resolved.
Show resolved Hide resolved


## Breaking changes

When doing breaking changes a deprecation tag should be added when possible and contain a message
that conveys to the user what which version that the deprecated method/field will be removed in and
what method they should use instead to perform the task. The version specified should be at least
two versions after the current one, such that there will be at least one stable release where the
users get to see the deprecation warning and in the version after that (or a later version) the
wolfenrain marked this conversation as resolved.
Show resolved Hide resolved
deprecated entity should be removed.


## Creating a release

There are a few things to think about when doing a release:

- Search through the codebase for `@Deprecated` methods/fields and remove the ones that are marked
for removal in the version that you are intending to release.
- Create a PR containing the changes for removing the deprecated entities.
- Run `melos version -V <package>:<version> -V <package>:<version>` for Melos to generate a
Copy link
Contributor

Choose a reason for hiding this comment

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

Twice the -V? Is it meant to be current vs next? If so we we should make that more explicit in the command

Copy link
Member Author

@spydon spydon May 27, 2022

Choose a reason for hiding this comment

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

Twice the -V?

Yes, once for each package, and the version is the version for that package. Would it be more clear if I wrote it like this?

Suggested change
- Run `melos version -V <package>:<version> -V <package>:<version>` for Melos to generate a
- Run `melos version -V <package1>:<version> -V <package2>:<version>` for Melos to generate a

`CHANGELOG.md` file.
spydon marked this conversation as resolved.
Show resolved Hide resolved
- Go through the PRs with breaking changes and add migration documentation to the changelog.
There should be migration docs on each PR, if they haven't been copied to the commit message.
- Run `melos publish` to make sure that there aren't any problems with any of the packages and make
sure that all the versions are correct.
- Once you are satisfied with the result of the dry run, run `melos publish --no-dry-run`
- Create a PR containing the updated changelog and `pubspec.yaml` files.


[GitHub issue]: https://github.com/flame-engine/flame/issues/new
[GitHub issues]: https://github.com/flame-engine/flame/issues/new
[PRs]: https://github.com/flame-engine/flame/pulls
Expand Down