Browse Source

fix(build): add missing advisory translation key to en.json and fix auto_deploy priority order

staging
Ali Alavi 1 week ago
parent
commit
ee432181e9
  1. 30
      auto_deploy_staging.sh
  2. 1
      src/translations/locales/en.json

30
auto_deploy_staging.sh

@ -16,22 +16,18 @@ fi
# Fetch latest master and staging from origin # Fetch latest master and staging from origin
git fetch origin master staging --quiet git fetch origin master staging --quiet
# Check 1: Commits ahead on origin/master
MASTER_COMMITS=$(git rev-list --count HEAD..origin/master 2>/dev/null || echo 0)
# Check 2: Commits ahead on origin/staging
# Check 1: Commits ahead on origin/staging (pull staging updates first)
STAGING_COMMITS=$(git rev-list --count HEAD..origin/staging 2>/dev/null || echo 0) STAGING_COMMITS=$(git rev-list --count HEAD..origin/staging 2>/dev/null || echo 0)
DEPLOYED_COMMIT_FILE="$PROJECT_DIR/.last_deployed_commit"
LAST_DEPLOYED=$(cat "$DEPLOYED_COMMIT_FILE" 2>/dev/null || echo "")
CURRENT_HEAD=$(git rev-parse HEAD)
NEED_BUILD=0
if [ "$CURRENT_HEAD" != "$LAST_DEPLOYED" ]; then
if [ "$STAGING_COMMITS" -gt 0 ]; then
echo "$LOG_TAG 🚀 Detected $STAGING_COMMITS new commit(s) on origin/staging!"
git log --oneline HEAD..origin/staging
echo "$LOG_TAG Fast-forwarding / pulling latest origin/staging..."
git merge origin/staging --ff-only || git pull origin staging --no-edit
NEED_BUILD=1 NEED_BUILD=1
fi fi
# Check 2: Commits ahead on origin/master
MASTER_COMMITS=$(git rev-list --count HEAD..origin/master 2>/dev/null || echo 0)
if [ "$MASTER_COMMITS" -gt 0 ]; then if [ "$MASTER_COMMITS" -gt 0 ]; then
echo "$LOG_TAG 🚀 Detected $MASTER_COMMITS new commit(s) on origin/master!" echo "$LOG_TAG 🚀 Detected $MASTER_COMMITS new commit(s) on origin/master!"
git log --oneline HEAD..origin/master git log --oneline HEAD..origin/master
@ -42,11 +38,11 @@ if [ "$MASTER_COMMITS" -gt 0 ]; then
NEED_BUILD=1 NEED_BUILD=1
fi fi
if [ "$STAGING_COMMITS" -gt 0 ]; then
echo "$LOG_TAG 🚀 Detected $STAGING_COMMITS new commit(s) on origin/staging!"
git log --oneline HEAD..origin/staging
echo "$LOG_TAG Pulling latest origin/staging..."
git merge origin/staging --no-edit || git pull origin staging --no-edit
DEPLOYED_COMMIT_FILE="$PROJECT_DIR/.last_deployed_commit"
LAST_DEPLOYED=$(cat "$DEPLOYED_COMMIT_FILE" 2>/dev/null || echo "")
CURRENT_HEAD=$(git rev-parse HEAD)
if [ "$CURRENT_HEAD" != "$LAST_DEPLOYED" ]; then
NEED_BUILD=1 NEED_BUILD=1
fi fi

1
src/translations/locales/en.json

@ -832,6 +832,7 @@
"Subscription required": "Subscription required", "Subscription required": "Subscription required",
"To view profiles, you need a subscription. Each subscription includes up to {count} matches.": "To view profiles, you need a subscription. Each subscription includes up to {count} matches.", "To view profiles, you need a subscription. Each subscription includes up to {count} matches.": "To view profiles, you need a subscription. Each subscription includes up to {count} matches.",
"To view profiles, a subscription is required. This helps cover our support and matching services and applies only to male users": "To view profiles, a subscription is required. This helps cover our support and matching services and applies only to male users.", "To view profiles, a subscription is required. This helps cover our support and matching services and applies only to male users": "To view profiles, a subscription is required. This helps cover our support and matching services and applies only to male users.",
"To view profiles, a subscription is required. This helps cover our advisory and matching services and applies only to male users": "To view profiles, a subscription is required. This helps cover our advisory and matching services and applies only to male users.",
"{count} case introductions remaining of your subscription.": "{count} case introductions remaining of your subscription.", "{count} case introductions remaining of your subscription.": "{count} case introductions remaining of your subscription.",
"{days} days and {count} case introductions remaining of your subscription.": "{days} days and {count} case introductions remaining of your subscription.", "{days} days and {count} case introductions remaining of your subscription.": "{days} days and {count} case introductions remaining of your subscription.",
"You do not have enough Habib Coins": "You do not have enough Habib Coins", "You do not have enough Habib Coins": "You do not have enough Habib Coins",

Loading…
Cancel
Save