dadaguo-gms-cli
v0.2.3
Published
Merge shared branches and run FlowE standard build/deploy from a local git repository.
Readme
gms-cli
gms merges your current development branch into a shared branch, pushes the shared branch,
then switches back to your original branch.
It is useful for projects where many people merge feature branches into a common test branch.
Install
From npm:
npm install -g dadaguo-gms-cliFrom a local tarball:
npm install -g ./gms-cli-0.1.0.tgzUsage
gms [target_branch] [source_branch]Most of the time, run it from your development branch:
gms test/202605That means:
- stash local uncommitted and untracked changes
- fetch
origin - switch to
test/202605 - pull
origin/test/202605with--ff-only - merge the original development branch
- push
test/202605 - switch back to the original branch
- restore the stash
Per-repo default shared branch
Configure once:
git config mergeShared.target feat/March-TestThen run:
gmsEnvironment
GMS_TARGET=test/202605 gms
GMS_REMOTE=origin gmsFlowE build and deploy
gms deploy submits a FlowE standard build from the latest commit of a branch.
By default it returns immediately after submitting the build.
Use --wait when you want it to wait for build success and then deploy that build to the project's configured TEST resources.
It only uses an existing local git repository. It does not clone code automatically. Local uncommitted or untracked files are ignored by default during deploy.
Run it inside the project repository:
cd /Users/you/WebstormProjects/edu-thompson
gms deploy test/202605 --app edu-thompson-serviceOr specify the local repository from another directory:
gms deploy test/202605 \
--repo /Users/you/WebstormProjects/edu-thompson \
--app edu-thompson-serviceSubmit build and return immediately, which is the default:
gms deploy test/202605 --app edu-thompson-serviceWait for build success, then trigger deploy:
gms deploy test/202605 --app edu-thompson-service --waitWait for build success but skip deploy:
gms deploy test/202605 --app edu-thompson-service --wait --no-deployRequire a clean working tree explicitly:
gms deploy test/202605 --app edu-thompson-service --require-cleanIf you already know the FlowE project ID, you can still pass it explicitly:
gms deploy test/202605 --app edu-thompson-service --project-id 3129FlowE prerequisites
The npm package bundles the Wacloud/FlowE scripts needed by gms deploy, so teammates do not need to install Codex skills separately.
They still need company network access and Wacloud/FlowE permissions for the target project.
On first use, gms deploy checks Wacloud auth and opens the login flow when needed.
You also need permission to read the git repository, view the FlowE project, submit builds, and deploy to the selected TEST resource.
Useful environment overrides:
CODEX_HOME=/Users/you/.codex gms deploy test/202605 --app edu-thompson-service
FLOWE_STD_BUILD_SCRIPT=/path/to/flowe-std-build-operator.sh gms deploy test/202605 --app edu-thompson-serviceConflicts
If merge conflicts happen, gms stops on the shared branch and does not push.
If it stashed your local work, the stash is kept untouched.
After resolving:
git add <resolved-files>
git commit
git push origin <target_branch>
git stash pop
git switch <your_dev_branch>To abort:
git merge --abort
git stash pop
git switch <your_dev_branch>