1
+ # ###############
2
+ # HELP #
3
+ # ###############
4
+
5
+ function __help {
6
+ cat << EOF
7
+ Usage: app-deploy [OPTION] [ARGUMENTS]
8
+
9
+ A group of scripts and tools designed to assist in the deployment process. This script can:
10
+ - Initialize deploy options.
11
+ - Create trigger tag for CI/CD.
12
+ - Extract environments from a trigger tag.
13
+ - Generate a final build tag after CI/CD deployment.
14
+
15
+ Parameters:
16
+ --update Update the script to the latest version.
17
+ init Initialize the deploy-options file for the project.
18
+ trigger Generate a trigger tag for starting the CI/CD flow.
19
+ environments <trigger-tag>
20
+ Extract environments from the specified trigger tag.
21
+ tagging Generate a build tag after CI/CD uploads the build.
22
+ Accepts the following options:
23
+ -e <environment> Specify the environment to use as a tag prefix (e.g., internal-staging).
24
+ -p <file-path> Path to the file from which app version, build number, etc., will be extracted.
25
+ Supported formats: ipa, apk, aab.
26
+ Use in combination with -v for unsupported formats (e.g. zip).
27
+ -b <build-count> Specify the build count, usually the CI/CD counter.
28
+ -v <custom-app-version> Optional: Override the app version extracted from the file.
29
+ Useful for unsupported formats.
30
+ -c <changelog> Optional: Add a changelog to the release tag.
31
+
32
+ Examples:
33
+ 1. Initialize deploy options:
34
+ app-deploy init
35
+
36
+ 2. Generate a trigger tag:
37
+ app-deploy or app-deploy trigger
38
+ output: ci/internal-staging/2024-12-12T14-32
39
+
40
+ 3. Extract environments from a trigger tag:
41
+ app-deploy environments ci/internal-staging/2024-12-12T14-32
42
+ output: internal-staging
43
+
44
+ 4. Generate a final build tag:
45
+ app-deploy tagging -e "internal-staging" -p "path/to/my-app.ipa" -b "123" -c "Added new features"
46
+ output: internal-staging/v1.2.3-44b123
47
+
48
+ EOF
49
+ }
0 commit comments