Skip to content

Commit cc210c8

Browse files
committed
v0.20.1
- pull in universal mac app for cftokens - check glibc version when choosing linux cftokens build
1 parent 7447536 commit cc210c8

File tree

2 files changed

+14
-4
lines changed

2 files changed

+14
-4
lines changed

box.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"author":"John Berquist",
33
"bugs":"https://github.com/jcberquist/commandbox-cfformat/issues",
4-
"cftokens":"v0.16.11",
4+
"cftokens":"v0.16.12",
55
"devDependencies":{
66
"testbox":"^4.0.0"
77
},
@@ -16,7 +16,7 @@
1616
"URL":"http://opensource.org/licenses/MIT"
1717
}
1818
],
19-
"location":"jcberquist/commandbox-cfformat#v0.20.0",
19+
"location":"jcberquist/commandbox-cfformat#v0.20.1",
2020
"name":"cfformat",
2121
"repository":{
2222
"type":"git",
@@ -29,5 +29,5 @@
2929
"shortDescription":"A CommandBox module for formatting CFML component files.",
3030
"slug":"commandbox-cfformat",
3131
"type":"commandbox-modules",
32-
"version":"0.20.0"
32+
"version":"0.20.1"
3333
}

cftokens.cfc

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,17 @@ component {
5959
var bufferedReader = createObject('java', 'java.io.BufferedReader').init(inputStreamReader);
6060
var collector = createObject('java', 'java.util.stream.Collectors').joining(chr(10));
6161
var output = bufferedReader.lines().collect(collector);
62-
return output.findNoCase('musl') ? 'cftokens_linux_musl' : 'cftokens_linux';
62+
var firstLine = output.listToArray(chr(10))[1];
63+
64+
if (!find('musl', firstLine) && reFind('\s\d\.\d+$', firstLine)) {
65+
var semanticVersion = wirebox.getInstance('semanticVersion@semver');
66+
var version = firstLine.listToArray(' ').last();
67+
if (semanticVersion.compare(version, '2.35') > -1) {
68+
return 'cftokens_linux';
69+
}
70+
}
71+
72+
return 'cftokens_linux_musl';
6373
}
6474
}
6575

0 commit comments

Comments
 (0)