Skip to content

Commit

Permalink
doc
Browse files Browse the repository at this point in the history
  • Loading branch information
ludwig-pro committed Sep 21, 2022
1 parent 5e8a237 commit 66becb8
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 18 deletions.
68 changes: 52 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
# @getluko/mobile-release-process

Scripts to automate git flow used by our mobile team when releasing.
Scripts to automate git flow used by our mobile team when releasing. usefull for release and patch.

<img src="./docs/git_flow.png" width="1000" />

The `mobile-release-process` command will:
The `mobile-release-process release` command will:

- Ask you several questions to be sure that you can start the release
- Check the next app version number
- Prepare the master branch
- Push the branch to build the next alpha
- Prepare the branch to release a alpha or a patch
- Trigger build on Bitrise
- Prepare the next release
- Clean up the temporary branch

- Clean up all temporary branch

## Configuration

Expand All @@ -21,19 +21,55 @@ The `mobile-release-process` command will:
yarn add @getluko/mobile-release-process --dev
```

2. Disclaimer: you need to edit `src/configuration.ts` to reflet your project file
2. create a configuration file at root `.mobile-release-process.config.json`

```js
{
"infoPlist": "./ios/<project_name>/Info.plist", // mandatory, path to the Info.plist file
"buildGradle": "./android/app/build.gradle", // mandatory, path to the build.gradle file
"git": {
"alphaBranch": "alpha", // optional (default: alpha)
"devBranch": "dev", // optional (default: dev)
"masterBranch": "master", // optional (default: master)
"releaseBranch": "release", // optional (default: release)
"stagingBranch": "staging" // optional (default: staging)
},
// Use during the script execution to output shortcut link in the terminal
"bitrise": "https://app.bitrise.io/app/xxxxxxxxxx", // optional (default: undefined)
"notion": "https://www.notion.so/xxxx/xxxxx", // optional (default: undefined)
"playConsole": "https://play.google.com/console/xxxxx", // optional (default: undefined)
"testflight": "https://appstoreconnect.apple.com/xxxxx" // optional (default: undefined)
}
```

3. Command

We think about making this configuration dynamic on a next iteration if needed.
Release a new version of the app (new alpha), will bump by 10 the version number and buildNumber

3. Run the script
```
npx mobile-release-process
npx mobile-release-process release
```

## Next steps
Release a patch for the current app in alpha, will bump by 1 the version number agit addnd buildNumber

- [ ] Support patch release
- [ ] Externalize changelog depdendency
- [ ] Make git branch configuration dynamic
- [ ] Create alpha branch locally if not exist
- [ ] Export individual script for bump
```
npx mobile-release-process alpha-patch
```

Prepare the next alpha branch, we use this script with bitrise to build the next release in alpha

```
npx mobile-release-process create-alpha-branch
```

bump the version number by 1 or 10

```
npx mobile-release-process build-version-script
```

bump the build number by 1 or 10

```
npx mobile-release-process build-version-script
```
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@getluko/mobile-release-process",
"version": "0.0.5",
"version": "0.0.6",
"author": "luko",
"description": "Scripts to automate git flow used by mobile team to release",
"main": "build/src/index.js",
Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export async function run() {
await release();
return;
}
if (process.argv.includes("patch")) {
if (process.argv.includes("alpha-patch")) {
await patch();
return;
}
Expand Down

0 comments on commit 66becb8

Please sign in to comment.