Files
IronFox/scripts/env_ci.sh
T
Akash YadavandAkash Yadav aeb8d3a5f0 feat: lint shell scripts with shellcheck + shfmt in CI and pre-commit
ironfox-oss/IronFox!162
Add a blocking `lint` CI stage (runs first, on a lightweight Alpine
image) plus a core.hooksPath pre-commit hook, with scripts/lint.sh as
the shared runner for CI, the hook, and manual use. Checks are
configured in .shellcheckrc and formatting in .editorconfig.

Reformat all scripts with shfmt (2-space indent, switch-case indent,
space redirects) via .editorconfig, so a bare `shfmt` is consistent
everywhere. bootstrap.sh installs shellcheck + shfmt per-OS and
enables the pre-commit hook.

The hook is a convenience (bypassable with --no-verify); the CI
`lint-scripts` job is the enforcement gate. SC2086/SC2046 are
disabled for now as tracked follow-up.

MR-author: Akash Yadav <itsaky01@gmail.com>
Co-authored-by: Akash Yadav <contact@itsaky.com>
Approved-by: celenity <celenity@celenity.dev>
Merged-by: celenity <celenity@celenity.dev>
2026-07-31 02:33:10 +00:00

51 lines
2.4 KiB
Bash

# shellcheck shell=bash
# IronFox CI environment variables
# Set timezone to UTC for consistency
unset TZ
export TZ="UTC"
# Android keystore/app signing
export IRONFOX_ANDROID_KEYSTORE='/opt/IronFox/ironfox-android-keystore.jks'
export IRONFOX_ANDROID_KEYSTORE_KEY_ALIAS='ironfox'
export IRONFOX_ANDROID_KEYSTORE_KEY_PASS_FILE='/opt/IronFox/ironfox-android-signing-key-pass.txt'
export IRONFOX_ANDROID_KEYSTORE_PASS_FILE='/opt/IronFox/ironfox-android-keystore-pass.txt'
# Build date
export IRONFOX_DATE='/bin/date'
export IRONFOX_BUILD_DATE_OVERRIDE="${CI_PIPELINE_CREATED_AT}"
export IRONFOX_BUILD_ID_OVERRIDE="$("${IRONFOX_DATE}" -d "${CI_PIPELINE_CREATED_AT}" "+%Y%m%d%H%M%S")"
export IRONFOX_CORE_TIMESTAMP_OVERRIDE="$("${IRONFOX_DATE}" -d "${CI_PIPELINE_CREATED_AT}" "+%s%N")"
export IRONFOX_LOCAL_AC_VERSION_OVERRIDE="$("${IRONFOX_DATE}" -d "${CI_PIPELINE_CREATED_AT}" "+%s%N")"
export IRONFOX_LOCAL_AS_VERSION_OVERRIDE="$("${IRONFOX_DATE}" -d "${CI_PIPELINE_CREATED_AT}" "+%s%N")"
export IRONFOX_LOCAL_GLEAN_VERSION_OVERRIDE="$("${IRONFOX_DATE}" -d "${CI_PIPELINE_CREATED_AT}" "+%s%N")"
# GeckoView AAR archives
export IRONFOX_GECKOVIEW_AAR_ARM64="${IRONFOX_AAR_ARTIFACTS}/geckoview-arm64-v8a.zip"
export IRONFOX_GECKOVIEW_AAR_ARM="${IRONFOX_AAR_ARTIFACTS}/geckoview-armeabi-v7a.zip"
export IRONFOX_GECKOVIEW_AAR_X86_64="${IRONFOX_AAR_ARTIFACTS}/geckoview-x86_64.zip"
export IRONFOX_GECKOVIEW_BUNDLE_DIRECT=1
# Log directory
export IRONFOX_LOG_DIR="${IRONFOX_LOG_ARTIFACTS}"
# S3
## Artifacts
export IRONFOX_ARTIFACTS_S3_ACCESS_KEY_FILE='/opt/IronFox/ironfox-artifacts-s3-access-key.txt'
export IRONFOX_ARTIFACTS_S3_BUCKET_NAME_FILE='/opt/IronFox/ironfox-artifacts-s3-bucket-name.txt'
export IRONFOX_ARTIFACTS_S3_ENDPOINT_FILE='/opt/IronFox/ironfox-artifacts-s3-endpoint.txt'
export IRONFOX_ARTIFACTS_S3_SECRET_KEY_FILE='/opt/IronFox/ironfox-artifacts-s3-secret-key.txt'
## Releases
export IRONFOX_RELEASES_S3_ACCESS_KEY_FILE='/opt/IronFox/ironfox-releases-s3-access-key.txt'
export IRONFOX_RELEASES_S3_BUCKET_NAME_FILE='/opt/IronFox/ironfox-releases-s3-bucket-name.txt'
export IRONFOX_RELEASES_S3_ENDPOINT_FILE='/opt/IronFox/ironfox-releases-s3-endpoint.txt'
export IRONFOX_RELEASES_S3_SECRET_KEY_FILE='/opt/IronFox/ironfox-releases-s3-secret-key.txt'
# Safe Browsing
export IRONFOX_SB_GAPI_KEY_FILE='/opt/IronFox/ironfox-sb-gapi-key.txt'
# Skip the prompt to install IronFox via ADB after signing
export IRONFOX_SIGN_SKIP_ADB=1