Automated Branch Management for Weekly Releases in Meituan's Mobile Client
Meituan’s client team solved the complexity of weekly transportation‑app releases by discarding the long‑lived develop branch, creating per‑week Release branches from a continuously integrated Stage branch, and automating multi‑repo branch creation, synchronization checks, and bulk merges with Jenkins, enabling fast, reliable deployments across 16 repositories.
The article describes how Meituan's client team handles rapid weekly releases for its transportation business line by automating the management of multiple repositories and release branches.
Background
Internet products now iterate at high frequency, requiring teams to adopt a "small steps, fast run" approach. Meituan's client platform therefore introduced a weekly release strategy, which brings three main benefits: faster validation of product ideas, more flexible rollout cadence, and earlier bug fixes.
The previous release cadence was a four‑week cycle (three weeks of development + one‑half week of testing). Missed schedules could delay the next release by at least 20 days. The new weekly cadence removes fixed testing windows, allowing any completed feature to hop on the next "release train".
Pain Points for Business‑side Developers
Moving from a serial, monthly release model to a parallel, weekly model introduced several challenges:
Development cycles are no longer fixed; many features and versions run concurrently, increasing branch‑management complexity.
The transportation business line spans many repositories (16 Git repos across Android, iOS, RN, etc.), making branch creation, merging, and synchronization labor‑intensive.
Frequent changes in shared foundation libraries require the ability to release them on a weekly basis as well.
These issues raise the risk of branch conflicts, missed merges, and code safety problems.
Solution: Weekly Release Branch Management
The team introduced a new branching model:
Discard the long‑lived Develop branch.
Create a Release/x.x.x branch from Stage for each weekly version.
Use Stage as the mainline ("mother") branch that continuously integrates all released features.
After a release passes testing, merge it back into Stage. All active feature branches then sync with the updated Stage to keep the next release consistent.
Automation is achieved with Jenkins jobs that:
Batch‑create Release branches across all repositories.
Trigger notifications when Stage changes.
Run pre‑merge checks and block packaging if a branch is out‑of‑sync.
Generate pull‑requests for bulk merges before a release.
Key workflow steps are illustrated in the following diagrams:
Key Points of the Branch Process
Six critical checkpoints are enforced: branch creation, merge to mainline, mainline change notification, merge of mainline changes, synchronization detection, and unsynced‑branch interception. The process also covers multi‑repo coordination and hot‑fix handling.
The tooling stack includes Git + Atlassian Stash for repository management, Jenkins for build and automation, and an internal communication tool ("Elephant") for notifications.
Future Outlook
After ten successful mini‑releases with no production incidents, the team aims to further increase automation: automatically generate branches based on version numbers, resolve simple merge conflicts automatically, and eventually support faster release cadences such as bi‑weekly or daily releases.
Author
Wang Kun, Meituan client development engineer, responsible for the transportation client architecture and version management since 2016.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Meituan Technology Team
Over 10,000 engineers powering China’s leading lifestyle services e‑commerce platform. Supporting hundreds of millions of consumers, millions of merchants across 2,000+ industries. This is the public channel for the tech teams behind Meituan, Dianping, Meituan Waimai, Meituan Select, and related services.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
