Skip to main content

tcb fn publish-version

Publishes the current $LATEST as an immutable version snapshot.

Usage​

tcb fn publish-version <functionName> [description] [options]

Flags​

FlagRequiredDescriptionDefault
<functionName>YesFunction name—
[description]NoVersion description—
--metadata-file <path>NoWrite 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 $LATEST version
  • Only the code and configuration of $LATEST can be modified
  • Publishing takes an immutable snapshot of the current $LATEST, version numbers increase from 1
  • $LATEST cannot be deleted. To send traffic back to the latest code, adjust it with tcb fn config-route