Skip to content

Commit

Permalink
fix bug janhq#1013, enable posthog for release app version only (janh…
Browse files Browse the repository at this point in the history
…q#1019)

Co-authored-by: Hien To <[email protected]>
  • Loading branch information
hiento09 and hiento09 authored Dec 15, 2023
1 parent bcc9bd6 commit 66cd181
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/jan-electron-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ jobs:
APPLE_APP_SPECIFIC_PASSWORD: ${{ secrets.APPLE_APP_SPECIFIC_PASSWORD }}
APP_PATH: "."
DEVELOPER_ID: ${{ secrets.DEVELOPER_ID }}
ANALYTICS_ID: ${{ secrets.POSTHOG_PROJECT_API_KEY }}
ANALYTICS_HOST: ${{ secrets.POSTHOG_APP_URL }}

build-windows-x64:
runs-on: windows-latest
Expand Down Expand Up @@ -125,6 +127,9 @@ jobs:
shell: cmd
run: |
make build
env:
ANALYTICS_ID: ${{ secrets.POSTHOG_PROJECT_API_KEY }}
ANALYTICS_HOST: ${{ secrets.POSTHOG_APP_URL }}

- name: Windows Code Sign with AzureSignTool
run: |
Expand Down Expand Up @@ -202,6 +207,8 @@ jobs:
make build-and-publish
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ANALYTICS_ID: ${{ secrets.POSTHOG_PROJECT_API_KEY }}
ANALYTICS_HOST: ${{ secrets.POSTHOG_APP_URL }}

update_release_draft:
needs: [build-macos, build-windows-x64, build-linux-x64, create-draft-release]
Expand Down
6 changes: 2 additions & 4 deletions web/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,9 @@ const nextConfig = {
),
VERSION: JSON.stringify(packageJson.version),
ANALYTICS_ID:
process.env.ANALYTICS_ID ??
JSON.stringify('phc_cJ95zWbMwdef6nVasPCoSNOvV8lUcL5IykIYOoyGXVm'),
JSON.stringify(process.env.ANALYTICS_ID) ?? JSON.stringify('xxx'),
ANALYTICS_HOST:
process.env.ANALYTICS_HOST ??
JSON.stringify('https://app.posthog.com'),
JSON.stringify(process.env.ANALYTICS_HOST) ?? JSON.stringify('xxx'),
}),
]
return config
Expand Down

0 comments on commit 66cd181

Please sign in to comment.