2023-01-26 20:00:27 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								# How to release SCM-Manager v2 core (Script)
  
						 
					
						
							
								
									
										
										
										
											2020-05-08 16:35:16 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-01-26 20:00:27 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								The most easy way to release the core is to use the release script. This will guide you
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								through all necessary tasks.
							 
						 
					
						
							
								
									
										
										
										
											2020-03-09 08:01:43 +01:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-01-26 20:00:27 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								Mind that the script does not care about `support`  branches, so if you have one, take
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								the manual way described below!
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								Make sure you have no changes you want to keep! The script will clean up everything.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								```bash
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								./release.sh
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								```
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								It will
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								-  Clean up your repository with the latest revision of `develop` , 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								-  Update the `CHANGELOG`  file, 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								-  Show you the changes it made, 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								-  Ask you whether to proceed or not, 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								-  Create a commit with the changes, and 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								-  Create and push the release branch. 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								# Manual core release
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								To release a new version of SCM-Manager v2 "manually", 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 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-01-26 20:00:27 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								```bash
							 
						 
					
						
							
								
									
										
										
										
											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.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-01-26 20:00:27 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								```bash
							 
						 
					
						
							
								
									
										
										
										
											2020-06-19 07:28:31 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								git merge origin/support/<support branch>
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								```
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-02-02 11:02:31 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								## Update Changelog
  
						 
					
						
							
								
									
										
										
										
											2020-03-09 08:01:43 +01:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-02-02 11:02:31 +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
							 
						 
					
						
							
								
									
										
										
										
											2023-01-26 20:00:27 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								export VERSION=$(./gradlew :updateChangelog | grep -oP "Using next version \K[0-9.]+")
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								echo About to release version $VERSION
							 
						 
					
						
							
								
									
										
										
										
											2021-02-02 11:02:31 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								```
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-01-26 20:00:27 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								The update changelog task will tell you the next version number.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-02-02 11:02:31 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								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.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2022-01-21 15:58:19 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								## Create release branch, commit changes and push
  
						 
					
						
							
								
									
										
										
										
											2020-03-09 08:01:43 +01:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-02-02 11:02:31 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								```bash
							 
						 
					
						
							
								
									
										
										
										
											2022-01-21 15:58:19 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								git rm -rf gradle/changelog \
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								&& git add CHANGELOG.md \
							 
						 
					
						
							
								
									
										
										
										
											2023-01-26 20:00:27 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								&& git checkout -b release/$VERSION \
							 
						 
					
						
							
								
									
										
										
										
											2022-01-21 15:58:19 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								&& git commit -m "Adjust changelog for release $VERSION" \
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								&& git push origin release/$VERSION
							 
						 
					
						
							
								
									
										
										
										
											2021-02-02 11:02:31 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								```
							 
						 
					
						
							
								
									
										
										
										
											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 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-02-02 10:32:57 +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
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-03-13 08:32:29 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								# Hotfix Releases of SCM-Manager
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								To release a hotfix version of SCM-Manager (or in other words a version, that is not based on the current
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								`develop`  branch but on an older tag), there is a bit more manual work to do and there is no one-fits-all 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								 way, so consider each step carefully and don't take this as a copy-paste manual like the normal release.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								## Create hotfix branch
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								To trigger the release, create a hotfix branch on the tag you want to create the hotfix for (lets say,
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								that's version `2.30.0` ) and prepare the release like above:
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								```bash
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								git checkout 2.30.0
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								git checkout -b hotfix/2.30.1
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								```
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								Then apply your fixes (eg. by cherry picking the relevant commits) and update the `CHANGELOG.md`  (if you
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								have single changelog yaml files, you could use the `updateChangelog`  like above). Add the `CHANGELOG.md` ,
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								remove the yamls, and push the hotfix branch:
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								```
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								git rm -rf gradle/changelog
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								git add CHANGELOG.md
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								git commit -m "Adjust changelog for release 2.30.1"
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								git push origin hotfix/2.30.1
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								```
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								Jenkins will build and release the versions, create the new tag, but **will not **  update the `main`  or
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								`develop`  branches. So these updates come next. 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								## Update Branches
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								Depending on whether you released a hotfix for an older version or the latest release, you have to update
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								the `main`  branch to the new tag. So in our example, if there is no version `2.31.x`  yet, the new version
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								`2.30.1`  is the latest version and we have to update `main` : 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								```
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								git checkout main
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								git merge 2.30.1
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								git push origin main
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								```
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								Regardless of the `main`  branch, you should update the `develop`  branch and merge the hotfix to make clear,
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								that there are no changes that all changes are part of the current `develop`  state. Normally, this leads
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								to merge conflicts, because the version on `develop`  has been set to a new `SNAPSHOT` , while the version
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								of the hotfix has been updated to the new release version. So you have to merge all these conflicts manually.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								```
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								git checkout develop
							 
						 
					
						
							
								
									
										
										
										
											2023-09-01 11:10:43 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								git merge main
							 
						 
					
						
							
								
									
										
										
										
											2023-03-13 08:32:29 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								```
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								How these conflicts should be merged depends on the version that has been released:
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								-  If it has been a hotfix for an older version, you could keep the SNAPSHOT versions and simply discard the 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  released version.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								-  If the hotfix is the new main, you should take this new version and then manually create a new SNAPSHOT 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  based on the new hotfix version number using gradle: `./gradlew setVersionToNextSnapshot` .
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-03-09 08:01:43 +01:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								# 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` ):
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-02-02 10:32:57 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								## 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 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-01-26 20:00:27 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								```bash
							 
						 
					
						
							
								
									
										
										
										
											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.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-01-26 20:00:27 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								```bash
							 
						 
					
						
							
								
									
										
										
										
											2020-06-19 07:28:31 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								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 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-02-02 10:32:57 +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
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-01-26 20:00:27 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								This step is only needed, when you had to update the version in the prior step.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								If the core version has not been increased, this step can be skipped.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								```bash
							 
						 
					
						
							
								
									
										
										
										
											2021-02-02 10:32:57 +01: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 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-11-04 09:39:41 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								## Update Changelog
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								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
							 
						 
					
						
							
								
									
										
										
										
											2023-01-26 20:00:27 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								export VERSION=$(./gradlew :updateChangelog | grep -oP "Using next version \K[0-9.]+")
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								echo About to release version $VERSION
							 
						 
					
						
							
								
									
										
										
										
											2021-11-04 09:39:41 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								```
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-01-26 20:00:27 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								The task will tell you the next version number.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-11-04 09:39:41 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								Now we should manually check if the changelog looks good.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								```bash
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								git diff CHANGELOG.md
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								```
							 
						 
					
						
							
								
									
										
										
										
											2020-04-14 15:37:18 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2020-06-04 20:10:19 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								## Create, commit and push release branch
  
						 
					
						
							
								
									
										
										
										
											2020-03-09 08:01:43 +01:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-01-26 20:00:27 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								This step needs the `VERSION`  set in the step above.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								```bash
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								git rm -rf gradle/changelog \
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								&& git add CHANGELOG.md \
							 
						 
					
						
							
								
									
										
										
										
											2020-06-04 20:10:19 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								&& git checkout -b release/$VERSION \
							 
						 
					
						
							
								
									
										
										
										
											2023-01-26 20:00:27 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								&& git commit -m "Prepare release of $VERSION" \
							 
						 
					
						
							
								
									
										
										
										
											2020-06-18 14:50:28 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								&& 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 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-02-02 10:32:57 +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
  
						 
					
						
							
								
									
										
										
										
											2021-02-02 10:32:57 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								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
							 
						 
					
						
							
								
									
										
										
										
											2022-10-12 11:52:12 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								## Hotfix Release
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								The release of a hotfix version is still a partly manual process that requires some knowledge
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								of git and the versioning of SCM-Manager. Here is a helping hand as a guideline of how to release
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								a bugfix version of the latest release (for example a 2.x.1 after 2.x.0 has been released).
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								Mind that this process is only necessary, when there are commits on `develop`  that shall **not **  be
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								released, yet.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								1.  Checkout the tag of the release you want to create a bugfix release for (`git checkout 2.x.0` ) 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								2.  Create a hotfix branch for the new version (`git checkout -b hotfix/2.x.1` ) 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								3.  Apply the changes upon this branch 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								4.  Create the changelog either manually or by running `./gradlew :updateChangelog --release=2.x.1`  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								5.  Double check this all 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								6.  Push the hotfix branch 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								7.  Jenkins will build and release this hotfix with the given version 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								8.  When Jenkins has finished, fetch the changes (and the new tag) 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								9.  Merge this new Tag into `master`  (or fast-forward `master`  if possible) and push `master`  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								10.  If the hotfix is based upon the latest release, set the version to the next snapshot (`./gradlew setVersionToNextSnapshot` ) and commit these changes 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								11.  Merge this commit into `develop`  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								If the hotfix has been created for an older release, this process might be somewhat more complicated.
							 
						 
					
						
							
								
									
										
										
										
											2023-01-26 20:00:27 +01:00