Claude-skill-registry creating-upgrade-test-version
Creates test version branches for testing app upgrade functionality. Use when preparing upgrade test builds, testing version migration, or when the user mentions test version, 9005.x.x version numbers, upgrade testing, or version upgrade QA. Automates branch creation, version bumping, and build number hardcoding for upgrade flow verification.
git clone https://github.com/majiayu000/claude-skill-registry
T=$(mktemp -d) && git clone --depth=1 https://github.com/majiayu000/claude-skill-registry "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/data/creating-upgrade-test-version" ~/.claude/skills/majiayu000-claude-skill-registry-creating-upgrade-test-version && rm -rf "$T"
skills/data/creating-upgrade-test-version/SKILL.mdCreating Upgrade Test Version
Automates the creation of test version branches with hardcoded build configurations for testing app upgrade functionality and version migration flows.
Workflow
Step 1: Gather Version Information
Ask the user for the test version number using AskUserQuestion:
Question: "What test version number should be used?" Options: - "9005.20.0" (example format) - Custom input
The version should follow the pattern
9XXX.YY.Z where:
indicates a test version (e.g., 9005)9XXX
matches the production version being testedYY.Z
Step 2: Calculate Build Number
Calculate the build number as: current date (YYYYMMDD) + "00" suffix + 30
The build number must be 10 digits in format:
YYYYMMDD00 + 30 = YYYYMMDD30
Example: If today is
20260113, the build number is 2026011300 + 30 = 2026011330
# Calculate build number (10 digits) DATE=$(date +%Y%m%d) BUILD_NUMBER=$((${DATE}00 + 30)) echo "Build number: $BUILD_NUMBER" # Output: 2026011330
Step 3: Create and Checkout Branch
Create a new branch named after the test version:
git checkout -b <test_version> # Example: git checkout -b 9005.20.0
Step 4: Modify Configuration Files
Modify the following files in order:
4.1 Update .env.version
.env.versionChange the
VERSION field to the test version:
VERSION=<test_version> BUNDLE_VERSION=1
4.2 Update .github/actions/shared-env/action.yml
.github/actions/shared-env/action.ymlIn the "Setup ENV BUILD_NUMBER" steps, replace ALL build number logic with a hardcoded value. Remove the if/else conditions and simplify to:
- name: Setup ENV BUILD_NUMBER shell: bash run: | echo "BUILD_NUMBER=<calculated_build_number>" >> $GITHUB_ENV
Remove both:
- "Setup ENV BUILD_NUMBER to 1" step
- "Setup ENV BUILD_NUMBER by workflow_run" step
Replace with single step that hardcodes the build number.
4.3 Update .github/workflows/release-android.yml
.github/workflows/release-android.ymlIn the "Write .env.version" step, change:
echo "BUILD_NUMBER=${{ env.BUILD_NUMBER }}" >> .env.version
To:
echo "BUILD_NUMBER=<calculated_build_number>" >> .env.version
4.4 Update apps/mobile/android/app/build.gradle
apps/mobile/android/app/build.gradleIn the
defaultConfig block, update:
versionCode <calculated_build_number> versionName "<test_version>"
Example:
versionCode 2026011330 versionName "9005.20.0"
Step 5: Commit and Push
git add -A git commit -m "chore: prepare test version <test_version> with build number <build_number>" git push -u origin <test_version>
File Locations Summary
| File | Change |
|---|---|
| Update VERSION |
| Hardcode BUILD_NUMBER, remove conditionals |
| Hardcode BUILD_NUMBER in .env.version write |
| Update versionCode and versionName |
Example Execution
For test version
9005.20.0 on date 2026-01-13:
- Build number =
=2026011300 + 30
(10 digits)2026011330 - Create branch
9005.20.0 - Set VERSION=
in9005.20.0.env.version - Hardcode BUILD_NUMBER=
in shared-env action2026011330 - Hardcode BUILD_NUMBER=
in release-android workflow2026011330 - Set versionCode=
, versionName=2026011330
in build.gradle"9005.20.0" - Commit and push
Validation Checklist
Before pushing, verify:
- Branch name matches test version
-
VERSION field updated.env.version - Build number conditionals removed from shared-env
- Build number hardcoded in release-android workflow
- versionCode is numeric (build number)
- versionName is quoted string (test version)