Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
/*
* See the NOTICE file distributed with this work for additional
* information regarding copyright ownership.
*
* This is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
*
* This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this software; if not, write to the Free
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
import org.apache.tools.ant.filters.ReplaceTokens
// Run this Gradle build with 'gradle' to generate the various versions and variants from the template directory.
// Whenever a new version of XWiki is out, update this file to update the token values, run gradle and commit the
// result.
//
// Note: As a consequence only update the template files and never the generated files!
defaultTasks 'generate'
def dockerVersions = ['8', '9']
def dockerVariants = ['mysql-tomcat']
def tokens = [
'8' : [
xwikiVersion: '8.4.4',
xwikiSha256: 'b414edb4527e3d8b27c40a8c3f2f09423980de7963207b7dc89da71d14e7fb23'
],
'9' : [
xwikiVersion: '9.0',
xwikiSha256: 'faaca2aa1ade07448be944feb39db22131accfe82658463abfd55f93f859cc25'
]
]
task generate() {
doLast {
// Copy the template for all versions and variants
dockerVersions.each() { version ->
dockerVariants.each() { variant ->
copy {
from 'template'
into "${version}/${variant}"
include '**/*'
filter(ReplaceTokens, tokens: tokens[version])
filteringCharset = 'UTF-8'
}
}
}
}
}