hmos-version-bump

Increments versionCode and versionName in HarmonyOS AppScope app.json5 with build and device verification.

Updated Sep 3, 2026
One-click install
npx skills add https://github.com/YrracOwl/dsh-hmos-sidebar --skill hmos-version-bump-yrracowl
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: hmos-version-bump
Source: https://github.com/YrracOwl/dsh-hmos-sidebar/tree/main/packages/dsh-hmos-sidebar/presets/native-harmonyos/skills/hmos-version-bump
Command: npx skills add https://github.com/YrracOwl/dsh-hmos-sidebar --skill hmos-version-bump-yrracowl

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Manually bumping HarmonyOS app versions is error-prone: versionCode must follow a YYMMDD plus daily build-sequence convention, stale version numbers linger across docs and source files, and unverified changes can ship wrong versions to devices. This Skill enforces a closed-loop workflow that updates, cleans, builds, installs, and verifies the new version. ## Core Features & Use Cases - Rule-based version computation: Generates versionCode as YYMMDD plus a two-digit daily build sequence (resetting across days, incrementing same-day) and bumps the patch digit of versionName. - Single source of truth: Edits only AppScope/app.json5, then greps the entire project (AGENTS.md, docs, feature contracts, .ets/.ts files) to zero out all references to the old version numbers. - Build-install-verify loop: Builds with dcli__build_project, installs the debug-signed HAP via dcli__install_hap, and confirms the new version on-device with hdc bm dump, avoiding the appQuickFix placeholder-field trap. - Use Case: Before releasing a new HarmonyOS build, ask the agent to bump the version; it computes today's sequence number, updates app.json5, clears stale references, installs the debug HAP, and verifies versionCode/versionName on the device. ## Quick Start Ask the agent to bump the HarmonyOS project version number and verify it on the connected device before release.

Frequently Asked Questions about hmos-version-bump

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I bump the version number of a HarmonyOS app?

Edit versionCode and versionName in AppScope/app.json5, which is the single source of truth. versionCode uses YYMMDD plus a two-digit daily build sequence, and versionName increments its patch digit, followed by a build, install, and bm dump verification.

How is HarmonyOS versionCode calculated for daily builds?

versionCode combines the date in YYMMDD format with a two-digit build sequence, such as 26082201 for the second build on August 22, 2026. The sequence resets to 00 each new day and increments for same-day rebuilds, and it must stay monotonically increasing.

Why does bm dump show versionCode 0 and empty versionName?

Those values come from the appQuickFix sub-block, which is an empty placeholder and not the real version. The true versionCode and versionName appear in the applicationInfo section and the outer bundle fields, so grep for the new number to confirm.

Which HAP package should be installed on a real HarmonyOS device?

Install the debug-signed package, entry-debug-signed.hap, on real devices. Installing a default or release-signed build on a real device fails with error 9568322, so debug verification always uses the debug-signed artifact.

What happens if old version numbers remain elsewhere in the project?

Stale references in AGENTS.md, docs, feature contracts, or hardcoded .ets/.ts values cause inconsistency with app.json5. The workflow greps the entire project for the old versionCode and versionName and requires zero matches before the bump is considered complete.