Skip to content

Commit 9e359bf

Browse files
committed
Merge branch 'gunnarmorling-master'
2 parents 213ae82 + eba1e37 commit 9e359bf

37 files changed

+107
-6230
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ When serving up a simple universal zip binary, we always set the `platform` fiel
7272

7373
Migration scripts can be found under [changelogs](https://github.com/sdkman/sdkman-db-migrations/tree/master/src/main/scala/io/sdkman/changelogs) and are divided by candidate. Various helper functions have been provided at package scope to perform simple tasks such as adding a Version / Candidate or setting a new Default version.
7474

75-
#### Adding a new Candidate migration class
75+
#### Adding a new Candidate migration change log
7676

7777
Simply fork this repository and then add a db migration in the appropriate file (create a new class if your Candidate is not represented). Also ensure that the changelog order is set to the next value available among migration classes:
7878

src/main/scala/io/sdkman/changelogs/ActiveMQMigrations.scala

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package io.sdkman.changelogs
22

33
import com.github.mongobee.changeset.{ChangeLog, ChangeSet}
44
import com.mongodb.client.MongoDatabase
5+
import org.bson.Document
56

67
@ChangeLog(order = "060")
78
class ActiveMQMigrations {
@@ -10,14 +11,13 @@ class ActiveMQMigrations {
1011
id = "001-add_activemq_candidate",
1112
author = "xshyamx"
1213
)
13-
def migration001(implicit db: MongoDatabase) = {
14+
def migration001(implicit db: MongoDatabase): Candidate = {
1415
Candidate(
1516
candidate = "activemq",
1617
name = "Apache ActiveMQ (Classic)",
1718
description =
1819
"Apache ActiveMQ® is the most popular open source, multi-protocol, Java-based message broker. It supports industry standard protocols so users get the benefits of client choices across a broad range of languages and platforms. Connect from clients written in JavaScript, C, C++, Python, .Net, and more. Integrate your multi-platform applications using the ubiquitous AMQP protocol. Exchange messages between your web applications using STOMP over websockets. Manage your IoT devices using MQTT. Support your existing JMS infrastructure and beyond. ActiveMQ offers the power and flexibility to support any messaging use-case.",
19-
websiteUrl = "https://activemq.apache.org/",
20-
distribution = "UNIVERSAL"
20+
websiteUrl = "https://activemq.apache.org/"
2121
).insert()
2222
}
2323

@@ -26,7 +26,7 @@ class ActiveMQMigrations {
2626
id = "002-add_correct_activemq_candidate_urls",
2727
author = "xshyamx"
2828
)
29-
def migration002(implicit db: MongoDatabase) = {
29+
def migration002(implicit db: MongoDatabase): Document = {
3030
List(
3131
"5.16.2",
3232
"5.16.1",
@@ -75,10 +75,9 @@ class ActiveMQMigrations {
7575
candidate = "activemq",
7676
version = version,
7777
url =
78-
s"http://archive.apache.org/dist/activemq/$version/apache-activemq-$version-bin.zip"
78+
s"https://archive.apache.org/dist/activemq/$version/apache-activemq-$version-bin.zip"
7979
)
8080
)
81-
.validate()
8281
.insert()
8382
setCandidateDefault("activemq", "5.16.2")
8483
}

src/main/scala/io/sdkman/changelogs/AntMigration.scala

Lines changed: 0 additions & 198 deletions
Original file line numberDiff line numberDiff line change
@@ -5,204 +5,6 @@ import com.mongodb.client.MongoDatabase
55

66
@ChangeLog(order = "032")
77
class AntMigration {
8-
@ChangeSet(
9-
order = "001",
10-
id = "001-add_ant_1.9.10",
11-
author = "andrebrait"
12-
)
13-
def migration001(implicit db: MongoDatabase): Unit = {
14-
Version(
15-
"ant",
16-
"1.9.10",
17-
"https://archive.apache.org/dist/ant/binaries/apache-ant-1.9.10-bin.zip"
18-
).validate()
19-
.insert()
20-
}
21-
22-
@ChangeSet(
23-
order = "002",
24-
id = "002-add_ant_1.9.11",
25-
author = "andrebrait"
26-
)
27-
def migration002(implicit db: MongoDatabase): Unit = {
28-
Version(
29-
"ant",
30-
"1.9.11",
31-
"https://archive.apache.org/dist/ant/binaries/apache-ant-1.9.11-bin.zip"
32-
).validate()
33-
.insert()
34-
}
35-
36-
@ChangeSet(
37-
order = "003",
38-
id = "003-add_ant_1.9.12",
39-
author = "andrebrait"
40-
)
41-
def migration003(implicit db: MongoDatabase): Unit = {
42-
Version(
43-
"ant",
44-
"1.9.12",
45-
"https://archive.apache.org/dist/ant/binaries/apache-ant-1.9.12-bin.zip"
46-
).validate()
47-
.insert()
48-
}
49-
50-
@ChangeSet(
51-
order = "004",
52-
id = "004-add_ant_1.9.13",
53-
author = "andrebrait"
54-
)
55-
def migration004(implicit db: MongoDatabase): Unit = {
56-
Version(
57-
"ant",
58-
"1.9.13",
59-
"https://archive.apache.org/dist/ant/binaries/apache-ant-1.9.13-bin.zip"
60-
).validate()
61-
.insert()
62-
}
63-
64-
@ChangeSet(
65-
order = "005",
66-
id = "005-add_ant_1.9.14",
67-
author = "andrebrait"
68-
)
69-
def migration005(implicit db: MongoDatabase): Unit = {
70-
Version(
71-
"ant",
72-
"1.9.14",
73-
"https://archive.apache.org/dist/ant/binaries/apache-ant-1.9.14-bin.zip"
74-
).validate()
75-
.insert()
76-
}
77-
78-
@ChangeSet(
79-
order = "006",
80-
id = "006-add_ant_1.9.15",
81-
author = "andrebrait"
82-
)
83-
def migration006(implicit db: MongoDatabase): Unit = {
84-
Version(
85-
"ant",
86-
"1.9.15",
87-
"https://archive.apache.org/dist/ant/binaries/apache-ant-1.9.15-bin.zip"
88-
).validate()
89-
.insert()
90-
}
91-
92-
@ChangeSet(
93-
order = "007",
94-
id = "007-add_ant_1.10.2",
95-
author = "andrebrait"
96-
)
97-
def migration007(implicit db: MongoDatabase): Unit = {
98-
Version(
99-
"ant",
100-
"1.10.2",
101-
"https://archive.apache.org/dist/ant/binaries/apache-ant-1.10.2-bin.zip"
102-
).validate()
103-
.insert()
104-
}
105-
106-
@ChangeSet(
107-
order = "008",
108-
id = "008-add_ant_1.10.3",
109-
author = "andrebrait"
110-
)
111-
def migration008(implicit db: MongoDatabase): Unit = {
112-
Version(
113-
"ant",
114-
"1.10.3",
115-
"https://archive.apache.org/dist/ant/binaries/apache-ant-1.10.3-bin.zip"
116-
).validate()
117-
.insert()
118-
}
119-
120-
@ChangeSet(
121-
order = "009",
122-
id = "009-add_ant_1.10.4",
123-
author = "andrebrait"
124-
)
125-
def migration009(implicit db: MongoDatabase): Unit = {
126-
Version(
127-
"ant",
128-
"1.10.4",
129-
"https://archive.apache.org/dist/ant/binaries/apache-ant-1.10.4-bin.zip"
130-
).validate()
131-
.insert()
132-
}
133-
134-
@ChangeSet(
135-
order = "010",
136-
id = "010-add_ant_1.10.5",
137-
author = "andrebrait"
138-
)
139-
def migration010(implicit db: MongoDatabase): Unit = {
140-
Version(
141-
"ant",
142-
"1.10.5",
143-
"https://archive.apache.org/dist/ant/binaries/apache-ant-1.10.5-bin.zip"
144-
).validate()
145-
.insert()
146-
}
147-
148-
@ChangeSet(
149-
order = "011",
150-
id = "011-add_ant_1.10.6",
151-
author = "andrebrait"
152-
)
153-
def migration011(implicit db: MongoDatabase): Unit = {
154-
Version(
155-
"ant",
156-
"1.10.6",
157-
"https://archive.apache.org/dist/ant/binaries/apache-ant-1.10.6-bin.zip"
158-
).validate()
159-
.insert()
160-
}
161-
162-
@ChangeSet(
163-
order = "012",
164-
id = "012-add_ant_1.10.7",
165-
author = "andrebrait"
166-
)
167-
def migration012(implicit db: MongoDatabase): Unit = {
168-
Version(
169-
"ant",
170-
"1.10.7",
171-
"https://archive.apache.org/dist/ant/binaries/apache-ant-1.10.7-bin.zip"
172-
).validate()
173-
.insert()
174-
}
175-
176-
@ChangeSet(
177-
order = "013",
178-
id = "013-add_ant_1.10.8",
179-
author = "andrebrait"
180-
)
181-
def migration013(implicit db: MongoDatabase): Unit = {
182-
Version(
183-
"ant",
184-
"1.10.8",
185-
"https://archive.apache.org/dist/ant/binaries/apache-ant-1.10.8-bin.zip"
186-
).validate()
187-
.insert()
188-
.asCandidateDefault()
189-
}
190-
191-
@ChangeSet(
192-
order = "014",
193-
id = "014-add_ant_1.10.9",
194-
author = "aalmiray"
195-
)
196-
def migration014(implicit db: MongoDatabase): Unit = {
197-
Version(
198-
"ant",
199-
"1.10.9",
200-
"https://archive.apache.org/dist/ant/binaries/apache-ant-1.10.9-bin.zip"
201-
).validate()
202-
.insert()
203-
.asCandidateDefault()
204-
}
205-
2068
@ChangeSet(
2079
order = "015",
20810
id = "015-add_ant_1.10.10",

src/main/scala/io/sdkman/changelogs/AsciidoctorjMigrations.scala

Lines changed: 0 additions & 7 deletions
This file was deleted.

src/main/scala/io/sdkman/changelogs/CleanupMigrations.scala

Lines changed: 0 additions & 78 deletions
This file was deleted.

src/main/scala/io/sdkman/changelogs/CxfMigrations.scala

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import com.mongodb.client.MongoDatabase
77
class CxfMigrations {
88

99
@ChangeSet(order = "001", id = "001_add_cxf_3_2_4", author = "r0b0")
10-
def migration001(implicit db: MongoDatabase) = {
10+
def migration001(implicit db: MongoDatabase): Version = {
1111
Candidate(
1212
candidate = "cxf",
1313
name = "CXF",
@@ -23,26 +23,4 @@ class CxfMigrations {
2323
url = "http://apache.mirror.anlx.net/cxf/3.2.4/apache-cxf-3.2.4.zip"
2424
).insert()
2525
}
26-
27-
@ChangeSet(order = "002", id = "002_add_cxf_3_2_4-3_2_5", author = "marc0der")
28-
def migration002(implicit db: MongoDatabase) = {
29-
removeVersion("cxf", "3.2.4")
30-
Version(
31-
"cxf",
32-
"3.2.4",
33-
"https://archive.apache.org/dist/cxf/3.2.4/apache-cxf-3.2.4.zip"
34-
).validate()
35-
.insert()
36-
Version(
37-
"cxf",
38-
"3.2.5",
39-
"https://archive.apache.org/dist/cxf/3.2.5/apache-cxf-3.2.5.zip"
40-
).validate()
41-
.insert()
42-
}
43-
44-
@ChangeSet(order = "003", id = "003_make_3_2_5_default", author = "marc0der")
45-
def migration003(implicit db: MongoDatabase) = {
46-
setCandidateDefault("cxf", "3.2.5")
47-
}
4826
}

0 commit comments

Comments
 (0)