Skip to content

Commit e1b0329

Browse files
committed
port steps 10 & 11 to the ATR
1 parent 30b25cd commit e1b0329

File tree

8 files changed

+28
-226
lines changed

8 files changed

+28
-226
lines changed

buildSrc/src/main/groovy/org.apache.fineract.release.gradle

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -196,36 +196,10 @@ fineract {
196196
step10: [
197197
order: 10,
198198
description: 'Start voting on the dev mailing list',
199-
email: [
200-
from: "${findProperty('fineract.config.email')}",
201-
name: "${findProperty('fineract.config.name')}",
202-
to: "${findProperty('fineract.config.email')}",
203-
204-
mime: 'text/plain',
205-
subjectTemplate: [
206-
templateFile: "${projectDir}/buildSrc/src/main/resources/email/release.step10.vote.subject.ftl"
207-
],
208-
messageTemplate: [
209-
templateFile: "${projectDir}/buildSrc/src/main/resources/email/release.step10.vote.message.ftl"
210-
]
211-
]
212199
],
213200
step11: [
214201
order: 11,
215202
description: 'Conclude the vote and announce results',
216-
email: [
217-
from: "${findProperty('fineract.config.email')}",
218-
name: "${findProperty('fineract.config.name')}",
219-
to: "${findProperty('fineract.config.email')}",
220-
221-
mime: 'text/plain',
222-
subjectTemplate: [
223-
templateFile: "${projectDir}/buildSrc/src/main/resources/email/release.step11.vote.subject.ftl"
224-
],
225-
messageTemplate: [
226-
templateFile: "${projectDir}/buildSrc/src/main/resources/email/release.step11.vote.message.ftl"
227-
]
228-
]
229203
],
230204
step12: [
231205
order: 12,

buildSrc/src/main/groovy/org/apache/fineract/gradle/FineractPlugin.groovy

Lines changed: 2 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
*/
1919
package org.apache.fineract.gradle
2020

21-
import groovy.json.JsonSlurper
2221
import org.apache.commons.io.FileUtils
2322
import org.apache.commons.io.filefilter.NotFileFilter
2423
import org.apache.commons.io.filefilter.PrefixFileFilter
@@ -384,23 +383,7 @@ class FineractPlugin implements Plugin<Project> {
384383
doFirst {
385384
FineractPluginExtension.FineractPluginStep step = step(extension, "step10")
386385

387-
String version = project.properties?['fineract.release.version']
388-
389-
if(!version) {
390-
TextIO textIO = TextIoFactory.getTextIO();
391-
392-
version = textIO.newStringInputReader()
393-
.withPattern("\\d+.\\d+.\\d+")
394-
.read("Release Version");
395-
}
396-
397-
// TODO: input validation, see FINERACT-1610
398-
399-
this.context?.project?['fineract.release.version'] = version
400-
401-
if(step.email) {
402-
emailService.send( processEmailParams(step.email, this.context) )
403-
}
386+
printInstructions(project, "step10")
404387
}
405388
}
406389

@@ -409,28 +392,7 @@ class FineractPlugin implements Plugin<Project> {
409392
doFirst {
410393
FineractPluginExtension.FineractPluginStep step = step(extension, "step11")
411394

412-
String version = project.properties?['fineract.release.version']
413-
414-
if(!version) {
415-
TextIO textIO = TextIoFactory.getTextIO()
416-
417-
version = textIO.newStringInputReader()
418-
.withPattern("\\d+.\\d+.\\d+")
419-
.read("Release Version");
420-
}
421-
422-
// TODO: input validation, see FINERACT-1610
423-
424-
this.context?.project?['fineract.release.version'] = version
425-
426-
def jsonSlurper = new JsonSlurper()
427-
def data = jsonSlurper.parse(new File("buildSrc/src/main/resources/vote/result.${version}.json"))
428-
429-
this.context?.project?['fineract.vote'] = data
430-
431-
if(step.email) {
432-
emailService.send( processEmailParams(step.email, this.context) )
433-
}
395+
printInstructions(project, "step11")
434396
}
435397
}
436398

buildSrc/src/main/resources/email/release.step10.vote.message.ftl

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

buildSrc/src/main/resources/email/release.step11.vote.message.ftl

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

buildSrc/src/main/resources/email/release.step10.vote.subject.ftl renamed to buildSrc/src/main/resources/instructions/step10.txt.ftl

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,12 @@
1818
under the License.
1919
2020
-->
21-
[FINERACT] [VOTE] 🗳️ ${project['fineract.release.version']} for release
21+
22+
23+
[INSTRUCTIONS:START]
24+
25+
Initiate voting with the ATR (ASF Trusted Releases) tool.
26+
27+
https://release-test.apache.org
28+
29+
[INSTRUCTIONS:END]

buildSrc/src/main/resources/email/release.step11.vote.subject.ftl renamed to buildSrc/src/main/resources/instructions/step11.txt.ftl

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,12 @@
1818
under the License.
1919
2020
-->
21-
[FINERACT] [VOTE] [RESULT] 🧾️ ${project['fineract.release.version']} for release
21+
22+
23+
[INSTRUCTIONS:START]
24+
25+
Conclude voting with the ATR (ASF Trusted Releases) tool.
26+
27+
https://release-test.apache.org
28+
29+
[INSTRUCTIONS:END]

fineract-doc/src/docs/en/chapters/release/process-step10.adoc

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,14 @@
22

33
== Description
44

5-
Voting has to be done on [email protected]. You can close the vote after voting period expires (72 hours) and you accumulate sufficient votes (minimum 3 x +1 PMC votes).
6-
7-
[source,text]
8-
----
9-
include::{rootdir}/buildSrc/src/main/resources/email/release.step10.vote.subject.ftl[lines=21..]
10-
11-
include::{rootdir}/buildSrc/src/main/resources/email/release.step10.vote.message.ftl[lines=21..]
12-
----
5+
Initiate voting with https://release-test.apache.org[the ATR (ASF Trusted Releases) tool].
136

147
== Gradle Task
158

169
.Command
1710
[source,bash,subs="attributes+,+macros"]
1811
----
19-
./gradlew fineractReleaseStep10 -Pfineract.release.version={revnumber}
12+
./gradlew fineractReleaseStep10
2013
----
14+
15+
INFO: Use the ATR for this task.

fineract-doc/src/docs/en/chapters/release/process-step11.adoc

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,14 @@
22

33
== Description
44

5-
Upon receiving 3 x +1 from the PMC, or after 72 hours (whichever one comes first), reply to the voting thread and add the prefix "[RESULT]" to the subject line with the results, as follows:
6-
7-
[source,text]
8-
----
9-
include::{rootdir}/buildSrc/src/main/resources/email/release.step11.vote.subject.ftl[lines=21..]
10-
11-
include::{rootdir}/buildSrc/src/main/resources/email/release.step11.vote.message.ftl[lines=21..]
12-
----
5+
Conclude voting with https://release-test.apache.org[the ATR (ASF Trusted Releases) tool].
136

147
== Gradle Task
158

169
.Command
1710
[source,text,subs="attributes+,+macros"]
1811
----
19-
./gradlew fineractReleaseStep11 -Pfineract.release.version={revnumber}
12+
./gradlew fineractReleaseStep11
2013
----
14+
15+
INFO: Use the ATR for this task.

0 commit comments

Comments
 (0)