Skip to content

Commit

Permalink
chore: cut release (#44)
Browse files Browse the repository at this point in the history
  • Loading branch information
merlinpaypal authored May 22, 2024
2 parents d9b99f9 + a69e7e9 commit 590870f
Show file tree
Hide file tree
Showing 8 changed files with 43 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:

test_instrumentation:
name: Instrumentation Tests
runs-on: macos-latest
runs-on: ubuntu-latest

steps:
- name: Checkout repo
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,14 @@ jobs:
SIGNING_KEY_FILE: ${{ env.SIGNING_KEY_FILE_PATH }}
run: npx semantic-release@21

- name: Sync release to develop
uses: devmasx/merge-branch@master
with:
type: now
from_branch: release
target_branch: develop
github_token: ${{ secrets.GITHUB_TOKEN }}

- name: Publish to Maven
uses: ./.github/actions/publish_all_modules
with:
Expand Down
1 change: 1 addition & 0 deletions .idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 22 additions & 0 deletions .idea/dictionaries/base.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 0 additions & 14 deletions .idea/misc.xml

This file was deleted.

2 changes: 1 addition & 1 deletion .releaserc.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"branches": [
"release",
{"name": "develop", "prerelease": true},
{"name": "develop", "channel": "beta", "prerelease": true},
{"name": "prerelease", "prerelease": true}
],
"tagFormat": "${version}",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.platform.app.InstrumentationRegistry
import com.paypal.messages.config.PayPalEnvironment
import com.paypal.messages.config.PayPalMessageOfferType
import com.paypal.messages.config.message.PayPalMessageConfig
import com.paypal.messages.config.message.PayPalMessageData
import com.paypal.messages.config.message.PayPalMessageStyle
import com.paypal.messages.io.Api.preventEmptyValues
Expand Down Expand Up @@ -98,6 +99,7 @@ class ApiTest {
),
style = PayPalMessageStyle(),
)
PayPalMessageConfig.setGlobalAnalytics("test_integration_name", "test_integration_version")
val messageDataRequest = Api.createMessageDataRequest(config, "hash", instanceId)
val url = messageDataRequest.url.toString()

Expand All @@ -114,6 +116,8 @@ class ApiTest {
"buyer_country=US",
"offer=PAY_LATER_PAY_IN_1",
"merchant_config=hash",
"integration_name=test_integration_name",
"integration_version=test_integration_version",
)
expectedQueryParts.forEach { assertTrue("url does not contain $it", url.contains(it)) }
}
Expand Down
6 changes: 6 additions & 0 deletions library/src/main/java/com/paypal/messages/io/Api.kt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import com.google.gson.GsonBuilder
import com.google.gson.JsonObject
import com.paypal.messages.BuildConfig
import com.paypal.messages.analytics.CloudEvent
import com.paypal.messages.analytics.GlobalAnalytics
import com.paypal.messages.utils.LogCat
import com.paypal.messages.utils.PayPalErrors
import kotlinx.coroutines.CoroutineScope
Expand Down Expand Up @@ -45,6 +46,11 @@ object Api {
if (ignoreCache) addQueryParameter("ignore_cache", "true")
addQueryParameter("instance_id", instanceId.toString())

GlobalAnalytics.integrationName.takeIf { it.isNotEmpty() }?.let {
addQueryParameter("integration_name", GlobalAnalytics.integrationName)
addQueryParameter("integration_version", GlobalAnalytics.integrationVersion)
}

if (!stageTag.isNullOrBlank()) { addQueryParameter("stage_tag", stageTag) }

addQueryParameter("logo_type", config.style.logoType.name.lowercase())
Expand Down

0 comments on commit 590870f

Please sign in to comment.