A group of scripts facilitates mobile app deployment over CI with the following features:
- Initialize deploy options
- Extract environments from a trigger tag
- Creating trigger tags for starting a specific deployment workflow on the CI
- Creating final build tags by extracting environment and version data from the trigger tag and the resulting binary.
Trigger tags use the following format: ci/internal-staging/2024-12-16T10-16, where internal-staging should match the trigger condition for starting the appropriate workflow on the CI. The tag message set from this script can be used later for the changelog message on any CI (e.g., Bitrise).
Once the build process is finished on CI/CD and the installation file is uploaded to the deployment service, an additional script is available for creating the final build tag in format internal-staging/v1.0.0-45b46, where internal-staging is marking the build type (i.e., internal for TryOut Apps, or store for App/Play Store; staging for target/flavor type), v1.0.0-45 represents the build version (app version, build number, ...), and b46 that represents the unique build count on CI/CD. Optionally, an additional value, cXX (e.g., c100), can represent the code version on some platforms.
To successfully push tags to the repo, the local user and/or CI/CD project should have write access to the git repository.
This script is distributed via Homebrew through Infinum's tap:
brew install infinum/tap/app-deployHomebrew 6.0+ requires trusting non-official taps before installing from them, so if that command fails or prompts you to trust the tap, tap and trust it explicitly first, then install:
brew tap infinum/tap
brew trust infinum/tap
brew install app-deployThe same script is also published to npm as @infinum/app-deploy:
npm install -g @infinum/app-deployOnce installed, for local trigger tag creation, run app-deploy init inside the project root folder. That command will add .deploy-options.sh into the project's root folder. Once the file is added, update it according to your project needs.
Note: Do not change the name or location of the
.deploy-options.shfile!
Script can be updated by running:
brew upgrade app-deploy
# or, for npm installations
npm update -g @infinum/app-deployThis update will not effect .deploy-options.sh file.
If you installed app-deploy before v2.2.0 via the old install.sh script, migrate it to Homebrew:
- Run
app-deploy --updateif you're still on a pre-2.2.0 version, to pull in the last version that supports the migration. - Run
app-deploy --migrate. This removes the manual installation from/usr/local/bin(sudowill be requested) and installsapp-deployvia Homebrew.
--update no longer updates the script directly - once migrated, use brew upgrade app-deploy going forward.
For more details on migrating from v1 to v2, please check the Migration from v1 to v2 guidelines.
For detailed usage documentation, please check the wiki pages.
Releases are cut with scripts/release.sh, which keeps the version in app-deploy.sh and package.json in sync and publishes to both Homebrew and npm. The version is typed exactly once:
scripts/release.sh prepare 2.3.0 # bumps the version, pushes a release branch and opens a PR
# ... merge the PR ...
git checkout master && git pull
scripts/release.sh publish # tags, creates the GitHub release, publishes to npm, opens the tap PRBoth commands accept --dry-run (print what would happen) and --direct (push to the protected branch instead of opening a PR, for maintainers with bypass rights). publish skips any step that has already been done, so it can be re-run safely after a failure. Requirements: gh and npm authenticated, and the infinum/tap tap installed locally.
We believe that the community can help us improve and build better a product. Please refer to our contributing guide to learn about the types of contributions we accept and the process for submitting them.
To ensure that our community remains respectful and professional, we defined a code of conduct that we expect all contributors to follow.
We appreciate your interest and look forward to your contributions.
Copyright 2024 Infinum
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Maintained and sponsored by Infinum.