2020-03-09 08:01:43 +01:00
# How to release SCM-Manager v2 core
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-03-26 16:12:12 +01:00
git fetch && git checkout develop && git reset --hard origin/develop
2020-03-13 15:44:35 +01:00
```
2020-03-09 08:01:43 +01:00
## Modify Changelog
Change "Unreleased" header in `CHANGELOG.md` to `<version> - <current date>`
2020-03-13 15:44:35 +01:00
## Create release branch:
2020-03-09 08:01:43 +01:00
2020-03-13 15:44:35 +01:00
`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
```
2020-03-13 15:44:35 +01:00
git add CHANGELOG.md
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
2020-03-13 15:44:35 +01:00
- update `pom.xml` and `package.json`
- merge with master branch
- build and deploy everything
- set the new development version for the develop 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` ):
2020-03-13 15:30:52 +01:00
## Update to latest version
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-03-13 15:44:35 +01:00
git fetch && git checkout develop && git reset --hard origin/develop
2020-03-13 15:30:52 +01:00
```
2020-03-09 08:01:43 +01:00
## Set new version
Edit `pom.xml` :
- `version` and `scm.tag` have to be set to the new version.
- ensure that all dependencies to other scm resources have released versions
2020-03-13 09:02:42 +01:00
- ensure `parent.version` points to stable release
2020-03-09 08:01:43 +01:00
Edit `package.json` :
- `version` has to be set to the new version.
- ensure that all dependencies to other scm resources have released versions
2020-03-13 09:02:42 +01:00
- ensure the version of `@scm-manager/ui-plugins` points to the same version as `parent.version` in the `pom.xml`
2020-03-09 08:01:43 +01:00
## Modify Changelog
Change "Unreleased" header in `CHANGELOG.md` to `<version> - <current date>`
## Remove old dependencies
`rm -rf node_modules yarn.lock`
## Build
`mvn clean install`
## Commit and push release
```
git commit -am "Release version <version>"
git push origin develop
```
## Merge with master branch
2020-03-13 15:30:52 +01:00
The merge should be possible with a fast forward. If this fails, check for changes on the `master` branch that are not present on the `develop` branch. Merge these changes into the `develop` branch, first!
2020-03-09 08:01:43 +01:00
```
2020-03-13 15:44:35 +01:00
git checkout master && git pull && git merge develop --ff-only && git push origin master
2020-03-09 08:01:43 +01:00
```
## Create and push tag
```
git tag -s -a <version> -m "<version>"
git push --tags origin
```
## Prepare next development version
```
git checkout develop
```
Edit `pom.xml` : `version` has to be set to the new development version, `tag` to `HEAD` .
Edit `package.json` : `version` has to be set to the new development version.
```
git commit -am "Prepare for next development iteration"
git push origin develop
2020-03-13 09:02:42 +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 `index.md` in the Plugin-Center Repository.
Example: https://github.com/scm-manager/plugin-center/blob/master/src/plugins/scm-teamscale-plugin/index.md