- Run the following command to make the
setup-hooks
script executable
chmod +x ./scripts/setup-hooks.sh
- Then run the
setup-hooks
script. This will setup the git hooks.
./scripts/setup-hooks.sh
These are the scripts that you will run manually during development.
Run the following command to trigger build for all generated dart files.
scripts/build-runner.sh
Run the following command to generate translations from the json files in assets/translations.
scripts/generate-translations.sh
This will generate all dart files along with translations. It basically runs build runner and generate translations
scripts/generate-all.sh
Run the app on a device or an emulator.
scripts/run.sh [flavor] [--build-type]
- flavor:
dev, qa, prod
- build-type:
debug, profile, release
. Defaults todebug
. Example:
scripts/run.sh dev --debug
scripts/build.sh [file-format] [flavor] [--build-type] [--additional-flag]
- file-format:
apk, appbundle, ios
. - flavor:
dev, qa, prod
. - build-type:
debug, profile, release
. Defaults todebug
. - additional-flag: Any addition flag to pass to the
flutter build
command. Defaults to no flag. Example:
scripts/build.sh ios prod --release --no-codesign
Runs the flutter app's dev flavor with the device preview package enabled. Device preview let's you test how an app will look on various devices, orientations, etc.
scripts/device-preview.sh
These scripts are used by github actions CI/CD.
Bumps the versionCode/buildNumber
by 1 in pubspec.yaml
file. For example, it will
change version: 1.2.5+12
to version: 1.2.5+13
.
scripts/bump-build-number.sh
Sets the current version from pubspec.yaml
to the github actions environment variables.
scripts/gh-action-read-and-set-version-env.sh
Reads the version from pubspec.yaml
and creates a commit with the message "Bump version to (
version)". Then push the change to the current branch.
scripts/commit-version.sh