Skip to main content
Version: v5.6.1

opschain templates version archive

templates

opschain templates version archive <project>/<code> --version <v> [--ignore-in-use]

Archives a template version: it stops being assignable to assets. The server refuses the archive while assets use the version unless --ignore-in-use overrides the refusal. An archived version only accepts its own unarchive — every other write to it is refused until then.

Flags​

FlagMeaning
--version <v>The version to archive (required).
--ignore-in-useOverride the in-use refusal for versions that assets are pinned to.

Exit codes​

CodeMeaning
0Archived — prints archived version <v> of <project>/<code>.
1The template was not found, or the server refused (assets use the version and no override was passed).
2Usage error — missing required flag, malformed address, no server target.

Named errors​

  • required flag(s) "version" not set — exit 2.
  • expected <project>/<template-code>, got "<arg>" — exit 2.
  • template "<code>" not found in project "<project>" — exit 1.

Example​

opschain templates version archive demo/web_stack --version 0.9.0
archived version 0.9.0 of demo/web_stack

See also​

  • opschain docs cli/templates-version-unarchive — bring it back.
  • opschain docs cli/templates-assign — move assets off the version first.