tcb fn publish-version
Publishes the current $LATEST as an immutable version snapshot.
Usage
tcb fn publish-version <functionName> [description] [options]
Flags
| Flag | Required | Description | Default |
|---|---|---|---|
<functionName> | Yes | Function name | — |
[description] | No | Version description | — |
--metadata-file <path> | No | Write the resource metadata of this publish to a JSON file with action set to publish, without overwriting the create / update written by tcb fn deploy | — |
Example
# Publish without a description
tcb fn publish-version app
# Publish with a description
tcb fn publish-version app "Fix the login logic"
# Publish with a versioned description
tcb fn publish-version app "v1.2.0: add user profiles"
Version rules
- A function starts with the
$LATESTversion - Only the code and configuration of
$LATESTcan be modified - Publishing takes an immutable snapshot of the current
$LATEST, version numbers increase from1 $LATESTcannot be deleted. To send traffic back to the latest code, adjust it withtcb fn config-route
Related commands
- List versions
- Delete a version
- Traffic configuration: route traffic to a specific version