diff --git a/build.sh b/build.sh index 0d46342..0bc0d6d 100755 --- a/build.sh +++ b/build.sh @@ -7,4 +7,8 @@ git config user.name signald git am ../libsignal-service-java.patch python3 ../update-verification-metadata.py git diff --color=always -gradle assemble publish || (gradle --write-verification-metadata sha256 && git diff --color=always && exit 1) +gradle assemble || (gradle --write-verification-metadata sha256 && git diff --color=always && exit 1) + +if [ "$CI_COMMIT_REF_PROTECTED" == "true" ]; then + gradle publish +fi \ No newline at end of file diff --git a/libsignal-service-java.patch b/libsignal-service-java.patch index 126c2a3..693a1a6 100644 --- a/libsignal-service-java.patch +++ b/libsignal-service-java.patch @@ -1,4 +1,4 @@ -From 20ce40c4c4a960720ad7ebbe758500ed2c78b475 Mon Sep 17 00:00:00 2001 +From adbb5ae73f1fd61a17120b0f9cb44d7f6a063acd Mon Sep 17 00:00:00 2001 From: signald Date: Fri, 11 Feb 2022 23:16:57 -0800 Subject: [PATCH] update gradle files @@ -56,7 +56,7 @@ index 41c2533..f486ea8 100644 if (JavaVersion.current().isJava8Compatible()) { allprojects { diff --git a/dependencies.gradle b/dependencies.gradle -index b9e6765..85a91ba 100644 +index b9e6765..d57dea2 100644 --- a/dependencies.gradle +++ b/dependencies.gradle @@ -8,8 +8,7 @@ dependencyResolutionManagement { @@ -65,7 +65,7 @@ index b9e6765..85a91ba 100644 // 1st Party - alias('signal-client-java').to('org.whispersystems', 'signal-client-java').versionRef('signal-client') - alias('signal-client-android').to('org.whispersystems', 'signal-client-android').versionRef('signal-client') -+ alias('signal-client-java').to('org.signald', 'signal-client-java-'+ System.getenv("TARGET")).versionRef('signal-client') ++ alias('signal-client-java').to('org.signald', 'signal-client-java-'+ System.getenv("TARGET").replaceAll("_", "-")).versionRef('signal-client') // Third Party alias('jackson-core').to('com.fasterxml.jackson.core:jackson-databind:2.13.0') @@ -99,7 +99,7 @@ index 77f8957..01c281e 100644 diff --git a/service/build.gradle b/service/build.gradle -index db7d2eb..16b3723 100644 +index db7d2eb..35cbf13 100644 --- a/service/build.gradle +++ b/service/build.gradle @@ -21,6 +21,7 @@ compileJava { @@ -123,7 +123,7 @@ index db7d2eb..16b3723 100644 publications { mavenJava(MavenPublication) { - artifactId = 'signal-service-java' -+ artifactId = 'signal-service-java-' + System.getenv("TARGET") ++ artifactId = 'signal-service-java-' + System.getenv("TARGET").replaceAll("_", "-") from components.java pom {