Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
marandaneto committed Sep 26, 2023
1 parent e17fb70 commit 07932d9
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 66 deletions.
63 changes: 0 additions & 63 deletions .github/workflows/format-code.yml

This file was deleted.

33 changes: 33 additions & 0 deletions MIGRATION.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,36 @@
Migration from v2 to v3
============

## Setup v2

```kotlin
import com.posthog.PostHog

val apiKey = "..."
val posthog = PostHog.Builder(applicationContext, apiKey)
.captureApplicationLifecycleEvents()
captureDeepLinks()
.recordScreenViews()
.build()
PostHog.setSingletonInstance(posthog)

PostHog.with(applicationContext).capture("event")
```

## Setup v3

```kotlin
import com.posthog.PostHog
import com.posthog.android.PostHogAndroid
import com.posthog.android.PostHogAndroidConfig

val apiKey = "..."
val config = PostHogAndroidConfig(apiKey).apply {
captureApplicationLifecycleEvents = true
captureDeepLinks = true
captureScreenViews = true
}
PostHogAndroid.setup(applicationContext, config)

PostHog.capture("event")
```
4 changes: 1 addition & 3 deletions scripts/commit-code.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,8 @@ else
echo "Going to push the changes."
git config --global user.name 'PostHog Github Bot'
git config --global user.email '[email protected]'
git config pull.ff only
git fetch
git checkout ${GITHUB_BRANCH}
git commit -am "Push changes"
git merge --no-ff ${GITHUB_BRANCH}
git commit -am "Update version"
git push --set-upstream origin ${GITHUB_BRANCH}
fi

0 comments on commit 07932d9

Please sign in to comment.