Skip to content

Comments

docs: add VHS tape for bump command GIF#1878

Open
HankyStyle wants to merge 2 commits intocommitizen-tools:masterfrom
HankyStyle:docs/add-bump-tape
Open

docs: add VHS tape for bump command GIF#1878
HankyStyle wants to merge 2 commits intocommitizen-tools:masterfrom
HankyStyle:docs/add-bump-tape

Conversation

@HankyStyle
Copy link
Contributor

@HankyStyle HankyStyle commented Feb 23, 2026

Description

Use VHS tape to generate bump.gif

Once this PR is merged, the existing CI workflow (docspublish.yml) will automatically regenerate bump.gif on every push to master if the bump command has been changed.

Changes

  • Add docs/images/bump.tape for recording cz bump demo
  • Remove docs/images/bump.gif and replace it with docs/images/cli_interactive/bump.gif
  • Update docs/commands/bump.md gif image path to new location

Checklist

Was generative AI tooling used to co-author this PR?

  • Yes
    Gemini 3.0 + Antigravity

Code Changes

  • Run uv run poe all locally to ensure this change passes linter check and tests
  • Update the documentation for the changes

Documentation Changes

  • Run uv run poe doc locally to ensure the documentation pages renders correctly
image
  • Check and fix any broken links (internal or external)

Expected Behavior

The cz bump documentation page displays a VHS-generated GIF that demonstrates:

  1. cz version --project → shows 0.0.1
  2. cz bump → prompts for first tag, bumps to 0.1.0
  3. cz version --project → shows 0.1.0

Steps to Test This Pull Request

  1. Run cd docs/images && vhs bump.tape
  2. Verify cli_interactive/bump.gif is generated
  3. Run uv run poe doc and check the bump command page

Comment on lines +48 to +99
# Create a clean temporary directory for recording
Type "rm -rf /tmp/commitizen-example && mkdir -p /tmp/commitizen-example && cd /tmp/commitizen-example"
Enter
Sleep 500ms

# Initialize git repository
Type "git init"
Enter
Type "git config user.email 'you@example.com'"
Enter
Type "git config user.name 'Your Name'"
Enter
Sleep 500ms

# Initialize commitizen config with version 0.0.1 and changelog enabled
Type `cat > pyproject.toml << 'EOF'`
Enter
Sleep 100ms
Type `[tool.commitizen]`
Enter
Sleep 100ms
Type `version = "0.0.1"`
Enter
Sleep 100ms
Type `update_changelog_on_bump = true`
Enter
Sleep 100ms
Type "EOF"
Enter
Sleep 300ms

# Create initial commit (no tag, so cz bump will ask "Is this the first tag created?")
Type "git add pyproject.toml"
Enter
Sleep 300ms

Type "git commit -m 'chore: initial commit'"
Enter
Sleep 500ms

# Create a feat commit that will trigger a MINOR bump (0.0.1 -> 0.1.0)
Type "echo 'new feature' > feature.py"
Enter
Sleep 300ms

Type "git add feature.py"
Enter
Sleep 300ms

Type "git commit -m 'feat: add awesome new feature'"
Enter
Sleep 500ms
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure whether we should do the setup in this tape file. It is probably cleaner if we can setup the environment for recording in a bash script

Copy link
Contributor Author

@HankyStyle HankyStyle Feb 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you mean creating setup scripts (e.g. setup.sh) and let this tape source it in the beginning Hide section?

setup.sh


#!/bin/bash
set -e

git init
git config user.email 'you@example.com'
git config user.name 'Your Name'

cat > pyproject.toml << 'EOF'
[tool.commitizen]
version = "0.0.1"
update_changelog_on_bump = true
EOF

git add pyproject.toml
git commit -m 'chore: initial commit'

# Create a feat commit to trigger a MINOR bump (0.0.1 -> 0.1.0)
echo 'new feature' > feature.py
git add feature.py
git commit -m 'feat: add awesome new feature'

bump.tape

Hide
Type "source setup.sh && cd /tmp/commitizen-example" <-- source bash script
Enter
Sleep 2s
Type "clear"
Enter

Show
# Step 1: Show current version
Type "cz version --project"
Sleep 500ms
Enter
Sleep 1s

# Step 2: Run cz bump (no existing tag, will prompt for first tag)
Type "cz bump"
Sleep 500ms
Enter
......

Maybe we can set up the environment in docspublish.yml instead?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants