docs: add VHS tape for bump command GIF#1878
Open
HankyStyle wants to merge 2 commits intocommitizen-tools:masterfrom
Open
docs: add VHS tape for bump command GIF#1878HankyStyle wants to merge 2 commits intocommitizen-tools:masterfrom
HankyStyle wants to merge 2 commits intocommitizen-tools:masterfrom
Conversation
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 |
Collaborator
There was a problem hiding this comment.
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
Contributor
Author
There was a problem hiding this comment.
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?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Use VHS tape to generate
bump.gifOnce this PR is merged, the existing CI workflow (docspublish.yml) will automatically regenerate
bump.gifon every push to master if the bump command has been changed.Changes
docs/images/bump.tapefor recordingcz bumpdemodocs/images/bump.gifand replace it withdocs/images/cli_interactive/bump.gifdocs/commands/bump.mdgif image path to new locationChecklist
Was generative AI tooling used to co-author this PR?
Gemini 3.0 + Antigravity
Code Changes
uv run poe alllocally to ensure this change passes linter check and testsDocumentation Changes
uv run poe doclocally to ensure the documentation pages renders correctlyExpected Behavior
The
cz bumpdocumentation page displays a VHS-generated GIF that demonstrates:cz version --project→ shows0.0.1cz bump→ prompts for first tag, bumps to0.1.0cz version --project→ shows0.1.0Steps to Test This Pull Request
cd docs/images && vhs bump.tapecli_interactive/bump.gifis generateduv run poe docand check the bump command page