Files
SCM-Manager/docs/en/release-process.md

147 lines
3.8 KiB
Markdown
Raw Normal View History

2020-05-08 16:35:16 +02:00
# How to release SCM-Manager v2 core
2020-03-09 08:01:43 +01:00
2020-03-13 15:44:35 +01:00
To release a new version of SCM-Manager v2 you have to do the following steps (replace placeholders `<version>` accordingly, eg. with `2.1.0`):
2020-03-09 08:01:43 +01:00
## Check out default branch
2020-03-13 15:44:35 +01:00
Make sure you have no changes you want to keep!
2020-03-09 08:01:43 +01:00
2020-03-13 15:44:35 +01:00
```
2020-06-04 19:06:16 +02:00
git fetch && git checkout -f origin/develop && git clean -fd && git checkout -B develop
2020-03-13 15:44:35 +01:00
```
2020-03-09 08:01:43 +01:00
2020-06-19 07:28:31 +02:00
## Merge support branch
Check whether there is an integration branch for the previous release or bugfixes not merged into the develop branch. Merge them now.
```
git merge origin/support/<support branch>
```
## Update Changelog
2020-03-09 08:01:43 +01:00
The changelog must be updated to reflect the changes for the new release.
All unreleased changes are stored in the `gradle/changelog` directory.
The changelog can be updated with the `updateChangelog` gradle task.
```bash
./gradlew updateChangelog --release=<version>
```
Now we should manually check if the changelog looks good.
```bash
git diff CHANGELOG.md
```
If everything looks fine, we can remove the changelog directory.
```bash
rm -rf gradle/changelog
```
2020-03-09 08:01:43 +01:00
2020-04-09 19:45:24 +02:00
## Create release branch
2020-03-09 08:01:43 +01:00
```bash
git checkout -b release/<version>
```
2020-03-09 08:01:43 +01:00
2020-03-13 15:44:35 +01:00
## Commit version changes
2020-03-09 08:01:43 +01:00
```bash
git add CHANGELOG.md gradle/changelog
2020-03-13 15:44:35 +01:00
git commit -m "Adjust changelog for release <version>"
2020-03-09 08:01:43 +01:00
```
2020-03-13 15:44:35 +01:00
## Push release branch
2020-03-09 08:01:43 +01:00
2020-03-13 15:44:35 +01:00
`git push origin release/<version>`
2020-03-09 08:01:43 +01:00
2020-03-13 15:44:35 +01:00
## Wait for Jenkins build
2020-03-09 08:01:43 +01:00
2020-03-13 15:44:35 +01:00
Jenkins will
2020-03-09 08:01:43 +01:00
- update `gradle.properties` and `package.json`
2020-03-13 15:44:35 +01:00
- merge with master branch
- build and deploy everything
- set the new development version for the develop branch
2020-04-09 19:45:24 +02:00
- delete the release branch
2020-03-09 08:01:43 +01:00
## Make a party
# How to release SCM-Manager v2 plugins
To release a new version of a Plugin for SCM-Manager v2 you have to do the following steps (replace placeholder `<version>` accordingly, eg. with `2.1.0`):
## Attention: Migrate plugin to gradle
If an SCM-Manager plugin hasn't been migrated to gradle yet, this is highly recommended before release the next version.
The migration from maven to gradle can easily be done using [this tool](https://github.com/scm-manager/smp-maven-to-gradle).
2020-04-09 19:45:24 +02:00
## Check out default branch
2020-03-13 15:30:52 +01:00
2020-03-13 15:44:35 +01:00
Make sure you have no changes you want to keep!
2020-03-13 15:30:52 +01:00
```
2020-06-04 19:06:16 +02:00
git fetch && git checkout -f origin/develop && git clean -fd && git checkout -B develop
2020-03-13 15:30:52 +01:00
```
2020-06-19 07:28:31 +02:00
## Merge support branch
Check whether there is an integration branch for the previous release or bugfixes not merged into the develop branch. Merge them now.
```
git merge origin/support/<support branch>
```
2020-04-14 15:37:18 +02:00
## Update SCM parent if necessary
2020-03-09 08:01:43 +01:00
2020-04-14 15:37:18 +02:00
If you need to update the parent of the plugin to a new release of SCM-Manager, change it now:
2020-03-09 08:01:43 +01:00
- `build.gradle`: `scmVersion`
2020-04-14 15:37:18 +02:00
- `package.json`: `dependencies.ui-plugins`
2020-03-09 08:01:43 +01:00
2020-06-18 14:50:28 +02:00
## Plugin dependencies
Check if all plugin dependencies are proper versions and not SNAPSHOT!
## Build, commit and push
2020-04-14 15:37:18 +02:00
```
./gradlew build \
&& git add yarn.lock build.gradle package.json \
2020-06-04 19:06:16 +02:00
&& git commit -m "Update to new version of SCM-Manager" \
2020-06-04 20:10:19 +02:00
&& git push origin develop
2020-04-14 15:37:18 +02:00
```
2020-03-09 08:01:43 +01:00
2020-04-14 15:37:18 +02:00
Wait for Jenkins to be green.
2020-03-09 08:01:43 +01:00
2020-04-14 15:37:18 +02:00
## Modify Changelog
Change "Unreleased" header in `CHANGELOG.md` to `<version> - <current date>`
2020-06-04 20:10:19 +02:00
## Create, commit and push release branch
2020-03-09 08:01:43 +01:00
```
2020-06-04 20:10:19 +02:00
export VERSION=<version> \
&& git checkout -b release/$VERSION \
2020-06-18 14:50:28 +02:00
&& git commit -am "Prepare release of $VERSION" \
&& git push origin release/$VERSION
2020-03-09 08:01:43 +01:00
```
2020-04-09 19:45:24 +02:00
## Wait for Jenkins build
2020-03-09 08:01:43 +01:00
2020-04-09 19:45:24 +02:00
Jenkins will
2020-03-09 08:01:43 +01:00
- update versions in gradle.properties and package.json
2020-04-09 19:45:24 +02:00
- merge with master branch
- build and deploy everything
- set the new development version for the develop branch
- delete the release branch
2020-03-09 08:01:43 +01:00
2020-03-31 18:29:36 +02:00
## Attention: Creating new plugins
If you are creating a new plugin which doesn't exist in the SCM-Manager Plugin-Center yet, your plugin will not be shown after the release.
First you have to create a `plugin.yml` in the website repository.
2020-03-31 18:29:36 +02:00
2020-10-09 13:10:53 +02:00
Example: https://github.com/scm-manager/website/blob/master/content/plugins/scm-teamscale-plugin/plugin.yml