You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+1-165
Original file line number
Diff line number
Diff line change
@@ -50,172 +50,8 @@ app-deploy --update
50
50
> Script commands such as `install`, and `--update` will need `sudo` to execute successfully. Use it when requested.
51
51
52
52
## Usage
53
-
### Script modifications
54
53
55
-
#### Main option `app-deploy init`
56
-
57
-
Once `deploy-options` are generated with the `init` command, the script should be used as-is.
58
-
59
-
The only part that should be changed is stored inside the `.deploy-options.sh` file under the `deploy_options` function. This part of the script is responsible for creating the first part of the tag that can trigger a specific workflow on CI. If the given values are not enough or do not represent the project structure, they can be replaced with different values.
60
-
61
-
> Keep in mind that the prefix `internal-' should be used for builds created for internal testing, while builds for beta testing (e.g., Google Play Beta or Apple TestFlight) or public release should be prefixed as `beta—' or `play store`/ `app store`.
62
-
63
-
**Final variable name inside the `deploy_options` function must stay: `target`**
64
-
65
-
#### Configuration flags
66
-
67
-
As tag creation is divided into several small steps, some can be skipped and/or disabled by changing configuration flags at the beginning of the script inside the `.deploy-options.sh` file.
68
-
69
-
```bash
70
-
# If enabled, the console will be cleared on every script run.
71
-
# By default, this option is enabled
72
-
use_automatic_console_clean=true
73
-
# If enabled, commits that are not pushed will be pushed automatically without a confirmation dialog.
74
-
# By default, this option is disabled
75
-
enable_automatic_commit_push=false
76
-
# If enabled, a confirmation dialog with a deploy summary will be presented.
77
-
# By default, this option is enabled
78
-
enable_final_confirmation=true
79
-
```
80
-
##### Script version
81
-
If needed, you can specify the version of the script you want to run by changing the value of the `script_version` parameter. Available options are `v1` for the old (legacy) deployment flow and `v2` for the new deployment flow.
82
-
<b>v1</b>
83
-
Old deployment flow where local `app-deploy` command will generate a tag that includes and defines the app version and following build number without the `ci/` prefix (e.g.,. `internal-staging/v1.0.0-200`).
84
-
85
-
<b>v2</b>
86
-
This is a new deployment flow in which the local `app-deploy` command generates the new trigger tag described at the beginning of this readme.
87
-
88
-
### Commands
89
-
#### Local trigger `app-deploy [optional trigger]`
90
-
91
-
Script should be run just by calling the script name from the folder where `.deploy-options.sh` is stored (e.g. root folder):
92
-
93
-
```bash
94
-
app-deploy
95
-
```
96
-
97
-
After that, the script will check if everything is pushed to the remote, and if needed it will push all commits before it continues (automatic push can be enabled with `enable_automatic_commit_push` flag).
After selecting the target, the script will ask for the changelog. The console will open a preselected text editor where a changelog can be added. Keep in mind that closing that editor without entering the changelog will result in a script termination.
If everything is done correctly, the confirmation step will be shown with the summary of selected options (can be skipped by disabling the `enable_final_confirmation` flag):
Once the build is deployed, you can run the `tagging` option that will read the version from the installation file (ipa, apk, aab), combined with some input options, and as output, it will generate deployed build tag (e.g., `internal-staging/v1.0.0-45b46c100`). Mandatory parameters are **e**nvironment `-e`, **p**ath to installation file `p`, and CI/CD **b**uild counter `b`:
There are two optional parameters: a custom **v**ersion number that overrides one from the installation file `-v` and `-c`, which can be used to set the tag message representing the **c**hangelog.
186
-
187
-
#### Helper command `app-deploy environments`
188
-
To help you with parsing out triggered environments from the trigger tag, you can use `app-deploy environments $TAG` command, where `$TAG` is tag used for triggering the build. Tag must be in the format used by the trigger command (i.e., `ci/env1/env2/timestamp`).
189
-
```bash
190
-
deploy environments "ci/env1/env2/timestamp"
191
-
192
-
output:
193
-
env1
194
-
env2
195
-
```
196
-
197
-
For example, this command could be used for mapping trigger env notation into the CI/CD workflow name:
0 commit comments