Skip to content

Commit f7d4bd1

Browse files
committed
Rename TRIGGER_WORKER_VERSION to TRIGGER_VERSION
1 parent 1734214 commit f7d4bd1

File tree

4 files changed

+7
-6
lines changed

4 files changed

+7
-6
lines changed

packages/cli-v3/src/commands/deploy.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -486,7 +486,7 @@ async function _deployCommand(dir: string, options: DeployCommandOptions) {
486486
setGithubActionsOutputAndEnvVars({
487487
envVars: {
488488
TRIGGER_DEPLOYMENT_VERSION: version,
489-
TRIGGER_WORKER_VERSION: version,
489+
TRIGGER_VERSION: version,
490490
TRIGGER_DEPLOYMENT_SHORT_CODE: deployment.shortCode,
491491
TRIGGER_DEPLOYMENT_URL: `${authorization.dashboardUrl}/projects/v3/${resolvedConfig.project}/deployments/${deployment.shortCode}`,
492492
TRIGGER_TEST_URL: `${authorization.dashboardUrl}/projects/v3/${

packages/core/src/v3/types/tasks.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -774,7 +774,7 @@ export type TriggerOptions = {
774774

775775
/**
776776
* Specify the version of the deployed task to run. By default the "current" version is used at the time of execution,
777-
* but you can specify a specific version to run here. You can also set the TRIGGER_WORKER_VERSION environment
777+
* but you can specify a specific version to run here. You can also set the TRIGGER_VERSION environment
778778
* variables to run a specific version for all tasks.
779779
*
780780
* @example

packages/react-hooks/src/hooks/useTaskTrigger.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ export function useTaskTrigger<TTask extends AnyTask>(
8585
maxAttempts: options?.maxAttempts,
8686
metadata: options?.metadata,
8787
maxDuration: options?.maxDuration,
88+
lockToVersion: options?.version,
8889
},
8990
});
9091

packages/trigger-sdk/src/v3/shared.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -615,7 +615,7 @@ export async function batchTriggerById<TTask extends AnyTask>(
615615
metadata: item.options?.metadata,
616616
maxDuration: item.options?.maxDuration,
617617
machine: item.options?.machine,
618-
lockToVersion: item.options?.version ?? getEnvVar("TRIGGER_WORKER_VERSION"),
618+
lockToVersion: item.options?.version ?? getEnvVar("TRIGGER_VERSION"),
619619
},
620620
} satisfies BatchTriggerTaskV2RequestBody["items"][0];
621621
})
@@ -952,7 +952,7 @@ export async function batchTriggerTasks<TTasks extends readonly AnyTask[]>(
952952
metadata: item.options?.metadata,
953953
maxDuration: item.options?.maxDuration,
954954
machine: item.options?.machine,
955-
lockToVersion: item.options?.version ?? getEnvVar("TRIGGER_WORKER_VERSION"),
955+
lockToVersion: item.options?.version ?? getEnvVar("TRIGGER_VERSION"),
956956
},
957957
} satisfies BatchTriggerTaskV2RequestBody["items"][0];
958958
})
@@ -1208,7 +1208,7 @@ async function trigger_internal<TRunTypes extends AnyRunTypes>(
12081208
metadata: options?.metadata,
12091209
maxDuration: options?.maxDuration,
12101210
machine: options?.machine,
1211-
lockToVersion: options?.version ?? getEnvVar("TRIGGER_WORKER_VERSION"),
1211+
lockToVersion: options?.version ?? getEnvVar("TRIGGER_VERSION"),
12121212
},
12131213
},
12141214
{
@@ -1269,7 +1269,7 @@ async function batchTrigger_internal<TRunTypes extends AnyRunTypes>(
12691269
metadata: item.options?.metadata,
12701270
maxDuration: item.options?.maxDuration,
12711271
machine: item.options?.machine,
1272-
lockToVersion: item.options?.version ?? getEnvVar("TRIGGER_WORKER_VERSION"),
1272+
lockToVersion: item.options?.version ?? getEnvVar("TRIGGER_VERSION"),
12731273
},
12741274
} satisfies BatchTriggerTaskV2RequestBody["items"][0];
12751275
})

0 commit comments

Comments
 (0)