diff --git a/auto_deploy_staging.sh b/auto_deploy_staging.sh index 2c1a43d..a9c602c 100755 --- a/auto_deploy_staging.sh +++ b/auto_deploy_staging.sh @@ -16,22 +16,18 @@ fi # Fetch latest master and staging from origin 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) - -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 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 echo "$LOG_TAG 🚀 Detected $MASTER_COMMITS new commit(s) on origin/master!" git log --oneline HEAD..origin/master @@ -42,11 +38,11 @@ if [ "$MASTER_COMMITS" -gt 0 ]; then NEED_BUILD=1 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 fi diff --git a/src/translations/locales/en.json b/src/translations/locales/en.json index 6922fdc..c1043ae 100644 --- a/src/translations/locales/en.json +++ b/src/translations/locales/en.json @@ -832,6 +832,7 @@ "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, 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.", "{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",