Switch to main.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
:jdkversion: 1.8
|
||||
:org: spring-cloud
|
||||
:repo: spring-cloud-release-tools
|
||||
:branch: master
|
||||
:branch: main
|
||||
|
||||
image::https://github.com/{org}/{repo}/workflows/Build/badge.svg?style=svg["Build",link="https://github.com/{org}/{repo}/actions"]
|
||||
|
||||
@@ -9,7 +9,7 @@ include::spring-cloud-release-tools.adoc[]
|
||||
|
||||
== Building
|
||||
|
||||
include::https://raw.githubusercontent.com/spring-cloud/spring-cloud-build/master/docs/src/main/asciidoc/building.adoc[]
|
||||
include::https://raw.githubusercontent.com/spring-cloud/spring-cloud-build/main/docs/src/main/asciidoc/building.adoc[]
|
||||
|
||||
IMPORTANT: There are 2 different versions of language level used in Spring Cloud Sleuth.
|
||||
Java 1.7 is used for main sources and Java 1.8 is used for tests.
|
||||
@@ -19,4 +19,4 @@ If you do so your app will break during the Maven build.
|
||||
|
||||
== Contributing
|
||||
|
||||
include::https://raw.githubusercontent.com/spring-cloud/spring-cloud-build/master/docs/src/main/asciidoc/contributing.adoc[]
|
||||
include::https://raw.githubusercontent.com/spring-cloud/spring-cloud-build/main/docs/src/main/asciidoc/contributing.adoc[]
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
|releaser.meta-release.release-train-dependency-names | | All the names of dependencies that should be updated with the release train project version.
|
||||
|releaser.meta-release.release-train-project-name | | Name of the release train project.
|
||||
|releaser.pom.bom-version-pattern | | The pattern to match a version property in a BOM. Remember to catch the dependency name in a group. E.g. "^(spring-cloud-.*)\\.version$".
|
||||
|releaser.pom.branch | master | Which branch of release train BOM should be checked out. Defaults to {@code master}.
|
||||
|releaser.pom.branch | main | Which branch of release train BOM should be checked out. Defaults to {@code main}.
|
||||
|releaser.pom.ignored-pom-regex | ^.*\.git/.*$ | List of regular expressions of ignored poms. Defaults to test projects and samples.
|
||||
|releaser.pom.pom-with-boot-starter-parent | | Subfolder of the pom that contains the {@code spring-boot-starer-parent} dependency.
|
||||
|releaser.pom.this-train-bom | | Subfolder of the pom that contains the versions for the release train.
|
||||
|
||||
@@ -39,7 +39,7 @@ function check_if_anything_to_sync() {
|
||||
}
|
||||
|
||||
function retrieve_current_branch() {
|
||||
# Code getting the name of the current branch. For master we want to publish as we did until now
|
||||
# Code getting the name of the current branch. For main we want to publish as we did until now
|
||||
# https://stackoverflow.com/questions/1593051/how-to-programmatically-determine-the-current-checked-out-git-branch
|
||||
# If there is a branch already passed will reuse it - otherwise will try to find it
|
||||
CURRENT_BRANCH=${BRANCH}
|
||||
@@ -134,8 +134,8 @@ function add_docs_from_target() {
|
||||
|
||||
# Copies the docs by using the retrieved properties from Maven build
|
||||
function copy_docs_for_current_version() {
|
||||
if [[ "${CURRENT_BRANCH}" == "master" ]] ; then
|
||||
echo -e "Current branch is master - will copy the current docs only to the root folder"
|
||||
if [[ "${CURRENT_BRANCH}" == "main" ]] ; then
|
||||
echo -e "Current branch is main - will copy the current docs only to the root folder"
|
||||
for f in docs/target/generated-docs/*; do
|
||||
file=${f#docs/target/generated-docs/*}
|
||||
if ! git ls-files -i -o --exclude-standard --directory | grep -q ^$file$; then
|
||||
@@ -216,7 +216,7 @@ function commit_changes_if_applicable() {
|
||||
git commit -a -m "Sync docs from ${CURRENT_BRANCH} to gh-pages" && COMMIT_SUCCESSFUL="yes" || echo "Failed to commit changes"
|
||||
|
||||
# Uncomment the following push if you want to auto push to
|
||||
# the gh-pages branch whenever you commit to master locally.
|
||||
# the gh-pages branch whenever you commit to main locally.
|
||||
# This is a little extreme. Use with care!
|
||||
###################################################################
|
||||
if [[ "${COMMIT_SUCCESSFUL}" == "yes" ]] ; then
|
||||
@@ -249,7 +249,7 @@ The idea of this script is to update gh-pages branch with the generated docs. Wi
|
||||
the script will work in the following manner:
|
||||
|
||||
- if there's no gh-pages / target for docs module then the script ends
|
||||
- for master branch the generated docs are copied to the root of gh-pages branch
|
||||
- for main branch the generated docs are copied to the root of gh-pages branch
|
||||
- for any other branch (if that branch is whitelisted) a subfolder with branch name is created
|
||||
and docs are copied there
|
||||
- if the version switch is passed (-v) then a tag with (v) prefix will be retrieved and a folder
|
||||
|
||||
@@ -45,19 +45,19 @@ IMPORTANT: If you're doing a e.g. `M1` release, remember to not have any snapsho
|
||||
|
||||
Since the project is prepared, go to Jenkins and select the https://jenkins.spring.io/view/Spring%20Cloud/view/Releaser/[Releaser view], which the following image shows:
|
||||
|
||||
image::https://raw.githubusercontent.com/spring-cloud/spring-cloud-release-tools/master/docs/src/main/asciidoc/images/releasers.png[Releaser view]
|
||||
image::https://raw.githubusercontent.com/spring-cloud/spring-cloud-release-tools/main/docs/src/main/asciidoc/images/releasers.png[Releaser view]
|
||||
|
||||
. Pick the proper releaser project (for example, `spring-cloud-build-releaser`).
|
||||
The following image shows the settings for this example:
|
||||
|
||||
image::https://raw.githubusercontent.com/spring-cloud/spring-cloud-release-tools/master/docs/src/main/asciidoc/images/scBuildReleaser.png[Spring Cloud Build Releaser - build with parameters]
|
||||
image::https://raw.githubusercontent.com/spring-cloud/spring-cloud-release-tools/main/docs/src/main/asciidoc/images/scBuildReleaser.png[Spring Cloud Build Releaser - build with parameters]
|
||||
|
||||
. Next, click `Build with parameters`.
|
||||
The following image shows the UI for doing so:
|
||||
|
||||
image::https://raw.githubusercontent.com/spring-cloud/spring-cloud-release-tools/master/docs/src/main/asciidoc/images/runningScBuildReleaser.png[Updated `RELEASER_POM_BRANCH`]
|
||||
image::https://raw.githubusercontent.com/spring-cloud/spring-cloud-release-tools/main/docs/src/main/asciidoc/images/runningScBuildReleaser.png[Updated `RELEASER_POM_BRANCH`]
|
||||
|
||||
Pick from which branch you would like the project (for example, `spring-cloud-build` - defaults to `master`) to be built and update the `RELEASER_POM_BRANCH` to point to the checked-out branch of Spring Cloud Release (for example, `springCloudBuildRelease`).
|
||||
Pick from which branch you would like the project (for example, `spring-cloud-build` - defaults to `main`) to be built and update the `RELEASER_POM_BRANCH` to point to the checked-out branch of Spring Cloud Release (for example, `springCloudBuildRelease`).
|
||||
You can pick whether you want to perform only post-release tasks or the whole release.
|
||||
|
||||
. Finally, click `Build`.
|
||||
@@ -129,15 +129,15 @@ $ git add greenwich_sr2.properties && git commit -m "Added Greenwich.SR2 propert
|
||||
|
||||
Since the project is prepared, go to Jenkins and select the https://jenkins.spring.io/view/Spring%20Cloud/view/Releaser/[Releaser view], as the following image shows:
|
||||
|
||||
image::https://raw.githubusercontent.com/spring-cloud/spring-cloud-release-tools/master/docs/src/main/asciidoc/images/releasersForMetaRelease.png[Releaser view]
|
||||
image::https://raw.githubusercontent.com/spring-cloud/spring-cloud-release-tools/main/docs/src/main/asciidoc/images/releasersForMetaRelease.png[Releaser view]
|
||||
|
||||
. Pick the proper meta-releaser project (for example, `spring-cloud-meta-releaser`), as the following image shows:
|
||||
|
||||
image::https://raw.githubusercontent.com/spring-cloud/spring-cloud-release-tools/master/docs/src/main/asciidoc/images/springCloudMetaRelease.png[Spring Cloud Meta Releaser - build with parameters]
|
||||
image::https://raw.githubusercontent.com/spring-cloud/spring-cloud-release-tools/main/docs/src/main/asciidoc/images/springCloudMetaRelease.png[Spring Cloud Meta Releaser - build with parameters]
|
||||
|
||||
. Next, click `Build with parameters`.
|
||||
|
||||
image::https://raw.githubusercontent.com/spring-cloud/spring-cloud-release-tools/master/docs/src/main/asciidoc/images/runningSpringCloudMetaReleaser.png[Spring Cloud Meta Releaser view]
|
||||
image::https://raw.githubusercontent.com/spring-cloud/spring-cloud-release-tools/main/docs/src/main/asciidoc/images/runningSpringCloudMetaReleaser.png[Spring Cloud Meta Releaser view]
|
||||
|
||||
You have quite a few options to pick, but the most important one is to set the value of the `RELEASE_VERSION` to the given release train version (for example, `Greenwich.SR2`).
|
||||
Continue updating the rest of the fields if necessary and read the field descriptions and this documentation for more information.
|
||||
@@ -184,7 +184,7 @@ All the tasks are opt in, so if you do opt in for everything you'll get:
|
||||
|
||||
- Uses the fixed versions to clone and check out each project (e.g. `spring-cloud-sleuth: 2.1.0.RELEASE`)
|
||||
- From the version analyzes the branch and checks it out. E.g.
|
||||
** for `spring-cloud-release`'s `Finchley.RELEASE` version will resolve either `Finchley` branch or will fallback to `master` if there's no `Finchley` branch.
|
||||
** for `spring-cloud-release`'s `Finchley.RELEASE` version will resolve either `Finchley` branch or will fallback to `main` if there's no `Finchley` branch.
|
||||
** for `spring-cloud-sleuth`'s `2.1.0.RELEASE` version will resolve `2.1.x` branch
|
||||
- Performs the release tasks per each project
|
||||
- Performs the post release tasks at the end of the release
|
||||
@@ -556,7 +556,7 @@ IMPORTANT: For the meta-releaser to work we assume that the path to the configur
|
||||
|
||||
==== Specifying A Branch
|
||||
|
||||
By deafult the releaser will default to using the `master` branch of `spring-cloud-release`.
|
||||
By deafult the releaser will default to using the `main` branch of `spring-cloud-release`.
|
||||
If you would like to use another branch you can specify it using the `releaser.pom.branch` property.
|
||||
|
||||
[source,bash]
|
||||
|
||||
@@ -14,7 +14,7 @@ releaser:
|
||||
number-of-checked-milestones: 50
|
||||
update-github-milestones: true
|
||||
pom:
|
||||
branch: master
|
||||
branch: main
|
||||
pom-with-boot-starter-parent: spring-cloud-starter-parent/pom.xml
|
||||
this-train-bom: spring-cloud-stream-dependencies/pom.xml
|
||||
bom-version-pattern: "^(spring-cloud-.*)\\.version$"
|
||||
|
||||
@@ -846,9 +846,9 @@ public class ReleaserProperties implements Serializable {
|
||||
|
||||
/**
|
||||
* Which branch of release train BOM should be checked out. Defaults to
|
||||
* {@code master}.
|
||||
* {@code main}.
|
||||
*/
|
||||
private String branch = "master";
|
||||
private String branch = "main";
|
||||
|
||||
/**
|
||||
* Subfolder of the pom that contains the {@code spring-boot-starer-parent}
|
||||
|
||||
@@ -180,11 +180,11 @@ public class ProjectGitHandler implements Closeable {
|
||||
/**
|
||||
* From the version analyzes the branch and checks it out. E.g. - for
|
||||
* spring-cloud-release’s `Finchley.RELEASE version will resolve either Finchley
|
||||
* branch or will fallback to master if there’s no Finchley branch - for
|
||||
* branch or will fallback to main if there’s no Finchley branch - for
|
||||
* spring-cloud-sleuth’s `2.1.0.RELEASE version will resolve 2.1.x branch
|
||||
* @param url - of project to clone
|
||||
* @param versions - list of versions to check against, if none matches, will fallback
|
||||
* to master
|
||||
* to main
|
||||
* @return location of the cloned project
|
||||
*/
|
||||
public File cloneAndGuessBranch(String url, String... versions) {
|
||||
@@ -201,10 +201,10 @@ public class ProjectGitHandler implements Closeable {
|
||||
}
|
||||
String branchToCheckout = Arrays.stream(versions).map(this::branchFromVersion)
|
||||
.map(version -> gitRepo(clonedProject).hasBranch(version) ? version : "")
|
||||
.filter(StringUtils::hasText).findFirst().orElse("master");
|
||||
if ("master".equals(branchToCheckout)) {
|
||||
.filter(StringUtils::hasText).findFirst().orElse("main");
|
||||
if ("main".equals(branchToCheckout)) {
|
||||
log.info(
|
||||
"None of the versions {} matches a branch. Assuming that should work with master branch",
|
||||
"None of the versions {} matches a branch. Assuming that should work with main branch",
|
||||
(Object) versions);
|
||||
return clonedProject;
|
||||
}
|
||||
@@ -285,7 +285,7 @@ public class ProjectGitHandler implements Closeable {
|
||||
|
||||
// let's go with convention... If fixed version contains e.g.
|
||||
// 2.3.4.RELEASE of Sleuth, we will first check if `2.3.x` branch
|
||||
// exists. If not, then we will assume that `master` contains it
|
||||
// exists. If not, then we will assume that `main` contains it
|
||||
String branchFromVersion(String version) {
|
||||
// 2.3.4.RELEASE -> 2.3.4
|
||||
// 2.3.4-RELEASE -> 2.3.4
|
||||
|
||||
@@ -279,7 +279,7 @@ public class SaganUpdater {
|
||||
return "https://cloud.spring.io/spring-cloud-static/" + version.projectName
|
||||
+ "/{version}/reference/html/";
|
||||
}
|
||||
if (branch.toLowerCase().contains("master")) {
|
||||
if (branch.toLowerCase().contains("main")) {
|
||||
// sleuth/
|
||||
return "https://cloud.spring.io/" + version.projectName + "/reference/html/";
|
||||
}
|
||||
@@ -294,7 +294,7 @@ public class SaganUpdater {
|
||||
return "https://cloud.spring.io/spring-cloud-static/" + version.projectName
|
||||
+ "/{version}/";
|
||||
}
|
||||
if (branch.toLowerCase().contains("master")) {
|
||||
if (branch.toLowerCase().contains("main")) {
|
||||
// sleuth/
|
||||
return "https://cloud.spring.io/" + version.projectName + "/"
|
||||
+ version.projectName + ".html";
|
||||
|
||||
Reference in New Issue
Block a user