[KTIJ-29448] Add an env flag to allow updating Jps settings on TeamCity

GitOrigin-RevId: 954f62a4f85e80f81ef3fff3a5f4a128c9755446
This commit is contained in:
Veronika Sirotkina
2024-10-28 13:40:30 +01:00
committed by intellij-monorepo-bot
parent a5260f3476
commit 0940352c6d

View File

@@ -18,7 +18,9 @@ data class JpsResolverSettings(val sha256ChecksumsEnabled: Boolean, val bindRepo
fun readJpsResolverSettings(communityRoot: File, monorepoRoot: File?): JpsResolverSettings {
// Checksums and bind repository must be set locally and committed by developer:
// don't update them automatically on teamcity.
if (System.getenv("TEAMCITY_VERSION") != null) {
if (System.getenv("TEAMCITY_VERSION") != null
&& !System.getenv("MODEL_UPDATER_ALLOW_UPDATING_SETTINGS_ON_TEAMCITY").toBoolean()
) {
val settings = JpsResolverSettings(false, false)
println("Under TeamCity, resetting settings to: $settings")
return settings