Skip to content

Commit 25a308d

Browse files
committed
Track if current build is fork
1 parent 3b3fa27 commit 25a308d

File tree

7 files changed

+10
-1
lines changed

7 files changed

+10
-1
lines changed

.github/workflows/release-manual.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,3 +52,4 @@ jobs:
5252
env:
5353
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5454
NPM_CONFIG_PROVENANCE: true
55+
SHOPIFY_CLI_BUILD_REPO: ${{ github.repository }}

.github/workflows/release.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,4 @@ jobs:
4242
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
4343
NPM_CONFIG_PROVENANCE: true
4444
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
45+
SHOPIFY_CLI_BUILD_REPO: ${{ github.repository }}

.github/workflows/snapit.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,3 +47,4 @@ jobs:
4747
env:
4848
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4949
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
50+
SHOPIFY_CLI_BUILD_REPO: ${{ github.repository }}

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,3 +196,5 @@ packages/ui-extensions-dev-console/.eslintrc.js
196196
packages/ui-extensions-dev-console/css-transform.js
197197
packages/ui-extensions-dev-console/dist
198198
packages/cli-kit/src/cli/api/graphql/*/*_schema.graphql
199+
200+
.claude

packages/cli-kit/src/private/node/analytics.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ interface EnvironmentData {
6565
env_is_global: boolean
6666
env_auth_method: string
6767
env_is_wsl: boolean
68+
env_build_repository: string
6869
}
6970

7071
export async function getEnvironmentData(config: Interfaces.Config): Promise<EnvironmentData> {
@@ -89,6 +90,7 @@ export async function getEnvironmentData(config: Interfaces.Config): Promise<Env
8990
env_is_global: currentProcessIsGlobal(),
9091
env_auth_method: await getLastSeenAuthMethod(),
9192
env_is_wsl: await isWsl(),
93+
env_build_repository: process.env.SHOPIFY_CLI_BUILD_REPO ?? 'unknown',
9294
}
9395
}
9496

packages/cli-kit/src/public/node/monorail.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const url = 'https://monorail-edge.shopifysvc.com/v1/produce'
1010
type Optional<T> = T | null
1111

1212
// This is the topic name of the main event we log to Monorail, the command tracker
13-
export const MONORAIL_COMMAND_TOPIC = 'app_cli3_command/1.17'
13+
export const MONORAIL_COMMAND_TOPIC = 'app_cli3_command/1.18'
1414

1515
export interface Schemas {
1616
[MONORAIL_COMMAND_TOPIC]: {

packages/cli/bin/bundle.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ esBuild({
4646
// Necessary for theme-check-node to work
4747
'process.env.WEBPACK_MODE': 'true',
4848
'import.meta.vitest': 'false',
49+
// Injected during build to detect fork vs original repo
50+
'process.env.SHOPIFY_CLI_BUILD_REPO': JSON.stringify(process.env.SHOPIFY_CLI_BUILD_REPO || 'unknown'),
4951
},
5052
inject: ['../../bin/bundling/cjs-shims.js'],
5153
external,

0 commit comments

Comments
 (0)