mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
build scripts: change remote dir name on Mac OS machine to avoid conflicts
It may happen that several builds with the same number are started simultaneously. Also theoretically builds may start in the same second. (cherry picked from commit eda3c91, IDEA-CR-16653)
This commit is contained in:
+4
-4
@@ -65,10 +65,10 @@ class MacDmgBuilder {
|
||||
private static MacDmgBuilder createInstance(BuildContext buildContext, MacDistributionCustomizer customizer, MacHostProperties macHostProperties) {
|
||||
defineTasks(buildContext.ant, "${buildContext.paths.communityHome}/lib")
|
||||
|
||||
String remoteDir = "intellij-builds/${buildContext.fullBuildNumber}"
|
||||
if (remoteDir.toLowerCase().endsWith("snapshot")) {
|
||||
remoteDir += "-" + LocalDateTime.now().format(DateTimeFormatter.ISO_LOCAL_DATE_TIME).replace(':', '-')
|
||||
}
|
||||
String currentDateTimeString = LocalDateTime.now().format(DateTimeFormatter.ISO_LOCAL_DATE_TIME).replace(':', '-')
|
||||
int randomSeed = new Random().nextInt(Integer.MAX_VALUE)
|
||||
String remoteDir = "intellij-builds/${buildContext.fullBuildNumber}-${currentDateTimeString}-${randomSeed}"
|
||||
|
||||
new MacDmgBuilder(buildContext, customizer, remoteDir, macHostProperties)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user