From d80d5468520f3338a7d5e09f2f30a8857c8723b8 Mon Sep 17 00:00:00 2001 From: Mike Brown Date: Thu, 4 Jul 2024 11:09:09 +0100 Subject: [PATCH] DTSAM-379 canIDeploy Index 0 out of bounds for length 0 Issue - command line git to get commit hash replaced with system env var substring --- build.gradle | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/build.gradle b/build.gradle index 0829fc9e5..4f3b9c0f8 100644 --- a/build.gradle +++ b/build.gradle @@ -593,7 +593,8 @@ dependencyManagement { project.ext { pacticipant = 'accessMgmt_orgRoleMapping' - pacticipantVersion = getCheckedOutGitCommitHash() + // DTSAM-379 canIDeploy Index 0 out of bounds for length 0 Issue + pacticipantVersion = System.env.GIT_COMMIT.substring(0,9) } task contract(type: Test) { @@ -633,10 +634,6 @@ task runProviderPactVerification(type: Test) { runProviderPactVerification.finalizedBy pactVerify -static def getCheckedOutGitCommitHash() { - 'git rev-parse --verify --short HEAD'.execute().text.trim() -} - pact { broker { pactBrokerUrl = System.getenv("PACT_BROKER_FULL_URL") ?: 'http://localhost:9292'