vers tag is Vers’ analogue of git tag: a human-readable name pointing to a commit. Tags are mutable (you can move them with tag update) and cheap (deleting a tag doesn’t touch the commit it points to).
vers build -t, vers run-commit, and vers build’s FROM clause all accept tag names anywhere a commit id is expected.
Synopsis
vers tag create <name> <commit-id> [-d "description"]
vers tag list # Human-readable
vers tag list -q # Just names
vers tag list --format json # Machine-readable
vers tag get <name>
vers tag update <name> --commit <new-commit> # Move tag
vers tag update <name> --description "..." # Update description
vers tag delete <name> [<name>...]
Subcommands
vers tag create
Create a tag pointing to a commit.
Naming rules: alphanumeric characters plus -, _, .; 1–64 characters.
| Option | Description |
|---|
-d, --description | Optional description |
vers tag create production abc-123
vers tag create v1.2 abc-123 -d "First stable release"
vers tag list
List all tags in your organization.
| Option | Description |
|---|
-q, --quiet | Just names, one per line |
--format json | Machine-readable output |
vers tag list
vers tag list -q
vers tag list --format json | jq '.[] | {name, commit_id}'
vers tag get
Show details for a single tag.
vers tag get production
vers tag get production --format json
vers tag update
Move a tag or update its description. At least one of --commit or --description is required.
| Option | Description |
|---|
--commit | New commit id to point at |
-d, --description | New description |
# Promote a newer commit to production
vers tag update production --commit def-456
# Update the description in place
vers tag update production --description "Post-launch hotfix"
vers tag delete
Delete one or more tags. Commits they pointed at are unaffected.
vers tag delete staging
vers tag delete staging preview
vers tag delete $(vers tag list -q) # nuke all tags
Examples
Name your build outputs
vers build -t myapp:prod . # -t calls tag create under the hood
vers run-commit myapp:prod # Boot the latest prod build
COMMIT=$(vers build -q .)
vers tag create staging "$COMMIT"
# ...testing...
vers tag update production --commit "$COMMIT"
Branch off a named tag
vers branch production # Branch directly off the tag
Common Patterns
Tag the latest build
COMMIT=$(vers build -q .)
vers tag update latest --commit "$COMMIT"
COMMIT=$(vers build -q .)
vers tag update staging --commit "$COMMIT"
# ...after testing...
vers tag update production --commit "$COMMIT"
vers tag delete $(vers tag list -q | grep '^test-')
Pin a release
COMMIT=$(vers commit --format json | jq -r .commit_id)
vers tag create v1.2.0 "$COMMIT" -d "stable release, build $(date -u +%Y-%m-%dT%H:%M:%SZ)"
See also