Skip to content

Commit 2b66f53

Browse files
committed
feat: Publishers field ignore for state caching
1 parent 01be20c commit 2b66f53

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/main/groovy/com/avast/gradle/dockercompose/tasks/ComposeUp.groovy

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -209,8 +209,8 @@ abstract class ComposeUp extends DefaultTask {
209209
}
210210
}
211211

212-
private static final VOLATILE_STATE_KEYS = ['RunningFor']
213-
private static final UNSTABLE_ARRAY_STATE_KEYS = ['Mounts', 'Ports', 'Networks', 'Labels', 'Publishers']
212+
private static final VOLATILE_STATE_KEYS = ['RunningFor', 'Publishers']
213+
private static final UNSTABLE_ARRAY_STATE_KEYS = ['Mounts', 'Ports', 'Networks', 'Labels']
214214

215215
@Internal
216216
protected def getStateForCache() {
@@ -240,10 +240,9 @@ abstract class ComposeUp extends DefaultTask {
240240

241241
protected Object parseAndSortStateArray(Object list) {
242242
if (list instanceof List) {
243-
//Already provided as a List, no pre-parsing needed
244-
return list.sort { (first, second) -> first.toString() <=> second.toString() }.toArray()
243+
return list.sort { (first, second) -> first.toString() <=> second.toString() }
245244
} else if (list instanceof String && list.contains(",")) {
246-
//Not already a list, but a comma separated string
245+
// Actually not a list, but a comma separated string
247246
return list.split(',').collect { it.trim() }.sort().toArray()
248247
} else {
249248
return list

0 commit comments

Comments
 (0)