mirror of
https://codeberg.org/forgejo/docs.git
synced 2024-11-21 17:36:59 -05:00
9af05bfb01
Reviewed-on: https://codeberg.org/forgejo/website/pulls/323 # Conflicts: # v1.19/admin/command-line.md # v1.19/admin/config-cheat-sheet.md # v1.19/admin/database-preparation.md # v1.19/admin/email-setup.md # v1.19/admin/incoming-email.md # v1.19/admin/index.md # v1.19/admin/logging-documentation.md # v1.19/admin/reverse-proxy.md # v1.19/admin/seek-assistance.md # v1.19/admin/upgrade.md # v1.19/developer/code-forgejo-org.md # v1.19/developer/index.md # v1.19/index.md # v1.19/license.md # v1.19/user/agit-support.md # v1.19/user/api-usage.md # v1.19/user/authentication.md # v1.19/user/email-settings.md # v1.19/user/first-repository.md # v1.19/user/index.md # v1.19/user/issue-pull-request-templates.md # v1.19/user/issue-tracking-basics.md # v1.19/user/labels.md # v1.19/user/linked-references.md # v1.19/user/merge-message-templates.md # v1.19/user/oauth2-provider.md # v1.19/user/packages/cargo.md # v1.19/user/packages/chef.md # v1.19/user/packages/composer.md # v1.19/user/packages/conan.md # v1.19/user/packages/conda.md # v1.19/user/packages/container.md # v1.19/user/packages/generic.md # v1.19/user/packages/helm.md # v1.19/user/packages/index.md # v1.19/user/packages/maven.md # v1.19/user/packages/npm.md # v1.19/user/packages/nuget.md # v1.19/user/packages/pub.md # v1.19/user/packages/pypi.md # v1.19/user/packages/rubygems.md # v1.19/user/packages/storage.md # v1.19/user/packages/vagrant.md # v1.19/user/project.md # v1.19/user/protection.md # v1.19/user/push-options.md # v1.19/user/push-to-create.md # v1.19/user/repo-permissions.md # v1.19/user/webhooks.md # v1.19/user/wiki.md # v1.20/user/semver.md
45 lines
1.8 KiB
Markdown
45 lines
1.8 KiB
Markdown
---
|
|
title: Semantic version
|
|
license: 'CC-BY-SA-4.0'
|
|
---
|
|
|
|
[SemVer](https://semver.org/spec/v2.0.0.html) allows users to understand the scope of a software update at first glance, based on the following :
|
|
|
|
- Patch is increased for backwards-compatible bugfixes.
|
|
- Minor is increased for backwards-compatible new features.
|
|
- Major is increased for breaking changes.
|
|
|
|
_something_ could be :
|
|
|
|
- a command, an option or an argument, for a CLI ;
|
|
- a route path, a query parameter or a body property, for a REST API ;
|
|
- a text node, a button or a field, for a GUI.
|
|
|
|
Since Forgejo has all of the above, changes to all of those components should be taken into consideration when creating a new version number.
|
|
|
|
## Getting the Forgejo semantic version
|
|
|
|
As of Forgejo v1.19, there are two version numbering schemes:
|
|
|
|
- [Following the Gitea version](https://codeberg.org/forgejo/forgejo/src/branch/forgejo/CONTRIBUTING/RELEASE.md#release-numbering) which is not a semantic version
|
|
- Used to name release files
|
|
- Used for tagging releases
|
|
- Displayed in the web interface
|
|
- Returned by the `/api/v1/version` API endpoint
|
|
- Forgejo semantic version
|
|
- Returned by the `/api/forgejo/v1/version` API endpoint
|
|
|
|
For instance, the semantic version for https://code.forgejo.org can be obtained with:
|
|
|
|
```shell
|
|
$ curl https://code.forgejo.org/api/forgejo/v1/version
|
|
{"version":"3.0.0+0-gitea-1.19.0"}
|
|
```
|
|
|
|
## Understanding the Forgejo semantic version
|
|
|
|
The structure of the version number is `<major>.<minor>.<patch>+<build>-gitea-<gitea version>` where:
|
|
|
|
- `<major>.<minor>.<patch>` is conformant to [Semantic Versioning 2.0.0](https://semver.org/#semantic-versioning-200)
|
|
- `<build>` is the release build number of an otherwise identical source
|
|
- `gitea-<gitea version>` is the Gitea version this Forgejo release depends on
|