Merge branch 'pre-release/1.3.0' into develop
This commit is contained in:
commit
b0d6a0407a
1122 changed files with 76173 additions and 66002 deletions
33
docs/developer/workflows/changelog.md
Normal file
33
docs/developer/workflows/changelog.md
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
# Changelog fragments
|
||||
|
||||
We try to add changelog fragments when we make changes so that we can show users what we've done. These fragments are small text files that contain a summary of changes. When we make a release, we compile these into a full changelog using [towncrier](https://pypi.org/project/towncrier/).
|
||||
|
||||
Each changelog fragment should contain a short and meaningful summary of changes and include the issue number (where applicable). For example:
|
||||
|
||||
```text
|
||||
Fixed broken audio player on Chrome 42 for ogg files (#567)
|
||||
```
|
||||
|
||||
If there's no issue, insert the merge request identifier instead:
|
||||
|
||||
```text
|
||||
Fixed a typo in landing page copy (!342)
|
||||
```
|
||||
|
||||
## Naming
|
||||
|
||||
Changelog fragments use the following naming convention: `changes/changelog.d/<name>.category>`. The `<name>` can be anything that describes your work, or the issue ID. The category can be one of the following:
|
||||
|
||||
- `feature` – a new feature
|
||||
- `enhancement` – an extension of an existing feature
|
||||
- `bugfix` – a bugfix or patch
|
||||
- `refactoring` – refactored code
|
||||
- `doc` – new documentation
|
||||
- `i18n` – internationalization-related work
|
||||
- `misc` – any work that doesn't fit into the above categories
|
||||
|
||||
You can create these files manually or use the following command to create a fragment:
|
||||
|
||||
```sh
|
||||
towncrier new --edit $issue.$category
|
||||
```
|
||||
53
docs/developer/workflows/git.md
Normal file
53
docs/developer/workflows/git.md
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
# Git workflow
|
||||
|
||||
Funkwhale uses GitLab's merge requests to manage changes. The workflow looks like this:
|
||||
|
||||
1. Assign the issue you are working on to yourself, or create one if it doesn't exist
|
||||
2. Create a fork of the project
|
||||
3. Check out the `develop` branch. If you're making a minor change (such as fixing a typo) you can check out the `stable` branch
|
||||
4. Create a new branch based on the checked out branch. Make sure to give your branch a meaningful name and include the issue number if required
|
||||
5. Work on your changes locally. Try to keep each commit small to make reviews easier
|
||||
6. Add a changelog fragment summarizing your changes
|
||||
7. Lint the codebase using the following command:
|
||||
|
||||
::::{tab-set}
|
||||
|
||||
:::{tab-item} API code
|
||||
|
||||
```sh
|
||||
black --check --diff . # Run the black linter in the project root to highlight any new issues
|
||||
```
|
||||
|
||||
:::
|
||||
|
||||
:::{tab-item} Frontend code
|
||||
|
||||
```sh
|
||||
cd front
|
||||
yarn run eslint # Run eslint in the front directory
|
||||
```
|
||||
|
||||
:::
|
||||
|
||||
::::
|
||||
|
||||
8. Push your branch
|
||||
9. Create a merge request in the GitLab frontend
|
||||
10. We'll review your request and feed back
|
||||
|
||||
```{mermaid}
|
||||
%%{init: { 'gitGraph': {'mainBranchName': 'stable'} } }%%
|
||||
gitGraph
|
||||
commit
|
||||
branch develop
|
||||
commit
|
||||
commit
|
||||
branch feature
|
||||
commit
|
||||
commit
|
||||
checkout develop
|
||||
merge feature
|
||||
commit
|
||||
checkout stable
|
||||
merge develop
|
||||
```
|
||||
16
docs/developer/workflows/index.md
Normal file
16
docs/developer/workflows/index.md
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
# Development workflows
|
||||
|
||||
Funkwhale follows workflows for each area of development and release management. You can find a breakdown of these in this section.
|
||||
|
||||
```{toctree}
|
||||
---
|
||||
caption: Workflows
|
||||
maxdepth: 1
|
||||
---
|
||||
|
||||
git
|
||||
pre-commit
|
||||
changelog
|
||||
release
|
||||
|
||||
```
|
||||
20
docs/developer/workflows/pre-commit.md
Normal file
20
docs/developer/workflows/pre-commit.md
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
# Pre-commit
|
||||
|
||||
Funkwhale uses [pre-commit](https://pre-commit.com/) to ensure that the files you commit are properly formatted, follow best practice, and don't contain syntax or spelling errors.
|
||||
|
||||
You can install and setup pre-commit using the [quick-start guide on the pre-commit documentation](https://pre-commit.com/#quick-start). Make sure to install pre-commit and setup the git pre-commit hook so pre-commit runs before you commit any changes to the repository.
|
||||
|
||||
The workflow looks like this:
|
||||
|
||||
1. Install `pre-commit`.
|
||||
2. After cloning the repository, setup the pre-commit git hooks:
|
||||
|
||||
```sh
|
||||
git clone git@dev.funkwhale.audio:funkwhale/funkwhale.git
|
||||
cd funkwhale
|
||||
|
||||
pre-commit install
|
||||
```
|
||||
|
||||
3. Make your changes and commit them.
|
||||
4. If `pre-commit` fails to validate your changes, the commit process stops. Fix any reported errors and try again.
|
||||
109
docs/developer/workflows/release.md
Normal file
109
docs/developer/workflows/release.md
Normal file
|
|
@ -0,0 +1,109 @@
|
|||
# Make a release
|
||||
|
||||
Once we're ready to release a new version of the software, we can use the following process:
|
||||
|
||||
1. Export the new release version
|
||||
|
||||
```sh
|
||||
export NEXT_RELEASE=1.3.0
|
||||
```
|
||||
|
||||
2. Export the previous release version
|
||||
|
||||
```sh
|
||||
export PREVIOUS_RELEASE=1.2.9
|
||||
```
|
||||
|
||||
3. Pull the latest version of the `develop` branch. Use `stable` if you're releasing a bugfix.
|
||||
|
||||
::::{tab-set}
|
||||
|
||||
:::{tab-item} Bugfix release
|
||||
:sync: bugfix
|
||||
|
||||
```sh
|
||||
git checkout stable
|
||||
git pull
|
||||
```
|
||||
|
||||
:::
|
||||
|
||||
:::{tab-item} Feature release
|
||||
:sync: feature
|
||||
|
||||
```sh
|
||||
git checkout develop
|
||||
git pull
|
||||
```
|
||||
|
||||
:::
|
||||
|
||||
::::
|
||||
|
||||
4. Compile the changelog
|
||||
|
||||
```sh
|
||||
towncrier build --version $NEXT_RELEASE
|
||||
```
|
||||
|
||||
5. Check the output and fix typos and mistakes
|
||||
6. Add a list of contributors
|
||||
|
||||
```sh
|
||||
python3 scripts/get-contributions-stats.py $NEXT_RELEASE # Output a list of contributors
|
||||
git log $PREVIOUS_RELEASE.. --format="- %aN" --reverse | sort | uniq # Get a list of all commit authors
|
||||
nano CHANGELOG.md # Add these lists to the CHANGELOG.md
|
||||
```
|
||||
|
||||
7. Update the next release version
|
||||
|
||||
```sh
|
||||
cd api
|
||||
poetry version "$NEXT_RELEASE"
|
||||
cd ..
|
||||
```
|
||||
|
||||
8. Commit all changes
|
||||
|
||||
```sh
|
||||
git add .
|
||||
git commit -m "Version bump and changelog for $NEXT_RELEASE"
|
||||
```
|
||||
|
||||
9. Create a tag
|
||||
|
||||
```sh
|
||||
git tag $NEXT_RELEASE
|
||||
```
|
||||
|
||||
10. Publish the new tag to GitLab
|
||||
|
||||
```sh
|
||||
git push --tags && git push
|
||||
```
|
||||
|
||||
11. Merge your changes into the alternate branch
|
||||
|
||||
::::{tab-set}
|
||||
|
||||
:::{tab-item} Bugfix release
|
||||
:sync: bugfix
|
||||
|
||||
```sh
|
||||
git checkout develop && git merge stable && git push
|
||||
```
|
||||
|
||||
:::
|
||||
|
||||
:::{tab-item} Feature release
|
||||
:sync: feature
|
||||
|
||||
```sh
|
||||
git checkout stable && git merge develop && git push
|
||||
```
|
||||
|
||||
:::
|
||||
|
||||
::::
|
||||
|
||||
Don't forget to create a blog post to announce the new release!
|
||||
Loading…
Add table
Add a link
Reference in a new issue