From a53e483b61c20cdbfee5be07b7bc1ebabd1c0caf Mon Sep 17 00:00:00 2001 From: SayantanRC Date: Thu, 30 Mar 2023 21:18:46 +0530 Subject: [PATCH 1/6] update gitlab ci --- .gitlab-ci.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f88da22..aff855c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -15,6 +15,12 @@ cache: lib: stage: lib + rules: + - if: '$CI_COMMIT_TAG !~ "/^$/"' + when: always + - if: '$CI_PIPELINE_SOURCE == "merge_request_event"' + when: always + - when: manual script: - ./gradlew :lib:assembleRelease artifacts: @@ -23,5 +29,7 @@ lib: publish: stage: publish + needs: + - lib script: - ./gradlew :lib:publish -- GitLab From e9ded80ca62879b8a4042e82be5471bd2010974f Mon Sep 17 00:00:00 2001 From: SayantanRC Date: Thu, 30 Mar 2023 21:19:50 +0530 Subject: [PATCH 2/6] enableOsTag = true by default --- lib/src/main/java/foundation/e/lib/telemetry/Telemetry.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/src/main/java/foundation/e/lib/telemetry/Telemetry.kt b/lib/src/main/java/foundation/e/lib/telemetry/Telemetry.kt index 5f5765f..cd3e5ef 100644 --- a/lib/src/main/java/foundation/e/lib/telemetry/Telemetry.kt +++ b/lib/src/main/java/foundation/e/lib/telemetry/Telemetry.kt @@ -25,7 +25,7 @@ object Telemetry { * @param application: the application context */ @JvmStatic - fun init(identifier: String, application: Application, enableOsTag: Boolean) { + fun init(identifier: String, application: Application, enableOsTag: Boolean = true) { this.identifier = identifier this.application = application this.enableOsTag = enableOsTag -- GitLab From f37dac864d2292a96b9cf8316098dd98b3cbffe1 Mon Sep 17 00:00:00 2001 From: SayantanRC Date: Thu, 30 Mar 2023 21:20:28 +0530 Subject: [PATCH 3/6] update version --- lib/build.gradle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/build.gradle b/lib/build.gradle index bc680ce..4bdcb2b 100644 --- a/lib/build.gradle +++ b/lib/build.gradle @@ -6,8 +6,8 @@ plugins { def versionMajor = 0 def versionMinor = 0 -def versionPatch = 6 -def releasePatch = "alpha" +def versionPatch = 7 +def releasePatch = "test" android { namespace 'foundation.e.lib.telemetry' -- GitLab From 7f623fb6f45755444d24b9d649f69efdc7f26ee8 Mon Sep 17 00:00:00 2001 From: SayantanRC Date: Thu, 30 Mar 2023 21:21:34 +0530 Subject: [PATCH 4/6] improve code style --- lib/src/main/java/foundation/e/lib/telemetry/Telemetry.kt | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/src/main/java/foundation/e/lib/telemetry/Telemetry.kt b/lib/src/main/java/foundation/e/lib/telemetry/Telemetry.kt index cd3e5ef..f633451 100644 --- a/lib/src/main/java/foundation/e/lib/telemetry/Telemetry.kt +++ b/lib/src/main/java/foundation/e/lib/telemetry/Telemetry.kt @@ -32,8 +32,11 @@ object Telemetry { this.isTelemetryEnabled = checkTelemetryDeveloperOption() val sentryDsn = - if (isTelemetryEnabled) identifier - else String() + if (isTelemetryEnabled) { + identifier + } else { + String() + } SentryAndroid.init(application) { options -> options.dsn = sentryDsn -- GitLab From aa68e27e213ed9b13b225601d0e5716bee4a079f Mon Sep 17 00:00:00 2001 From: SayantanRC Date: Fri, 31 Mar 2023 00:17:13 +0530 Subject: [PATCH 5/6] manual publish for merge requests --- .gitlab-ci.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index aff855c..c50a536 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -31,5 +31,8 @@ publish: stage: publish needs: - lib + rules: + - if: '$CI_PIPELINE_SOURCE == "merge_request_event"' + when: manual script: - ./gradlew :lib:publish -- GitLab From b7854c9d063ee4b3758a07a8c431be553c3304f9 Mon Sep 17 00:00:00 2001 From: SayantanRC Date: Fri, 31 Mar 2023 00:20:38 +0530 Subject: [PATCH 6/6] update version --- lib/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/build.gradle b/lib/build.gradle index 4bdcb2b..8a9c0a9 100644 --- a/lib/build.gradle +++ b/lib/build.gradle @@ -7,7 +7,7 @@ plugins { def versionMajor = 0 def versionMinor = 0 def versionPatch = 7 -def releasePatch = "test" +def releasePatch = "alpha" android { namespace 'foundation.e.lib.telemetry' -- GitLab