comparison init70-github.gradle @ 360:8238fff451c9

Cygwin has an ENV that container 'CI'. Causing build issues. Just check for 'github' to determine if it is a local build
author davis@ssdt-ohio.org
date Wed, 15 Nov 2023 14:48:56 -0500
parents ab7103f0c154
children de8c350c511a
comparison
equal deleted inserted replaced
359:77ca22c4a0b3 360:8238fff451c9
33 hostname = "hostname".execute().text.toLowerCase().readLines().first() 33 hostname = "hostname".execute().text.toLowerCase().readLines().first()
34 } catch (e) { 34 } catch (e) {
35 hostname = 'unknown' 35 hostname = 'unknown'
36 } 36 }
37 37
38 println "System Env"
39 System.getenv().each {
40 " -> " + it.toString()
41 }
42
43 //Determine if the build is a CI build. 38 //Determine if the build is a CI build.
44 gradle.ext.bambooBuild = System.getenv().any { 39 gradle.ext.bambooBuild = System.getenv().any {
45 it.key.toLowerCase().contains('ci') || 40 it.key.toLowerCase().contains('github')
46 it.key.toLowerCase().contains('github')
47 } 41 }
48 42
49 gradle.ext.bambooLocalBuild = false 43 gradle.ext.bambooLocalBuild = false
50 44
51 gradle.ext.bambooPlan = (System.getenv('BAMBOO_PLAN') ?: 'UNKNOWN-UNKNOWN-JOB1').split('-')[0..1].join('-') 45 gradle.ext.bambooPlan = (System.getenv('BAMBOO_PLAN') ?: 'UNKNOWN-UNKNOWN-JOB1').split('-')[0..1].join('-')