From cf8a6a71a77920283da4d457412ee3bac1f7cb76 Mon Sep 17 00:00:00 2001 From: Astra Date: Tue, 10 Mar 2026 07:32:45 +0000 Subject: [PATCH 1/2] Update telegram-join-approval-bot submodule and apply patches --- scripts/sync.sh | 2 +- telegram-join-approval-bot | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/sync.sh b/scripts/sync.sh index 23090b4..6308b94 100755 --- a/scripts/sync.sh +++ b/scripts/sync.sh @@ -23,7 +23,7 @@ rm -rf "$ROOT_DIR/config" "$ROOT_DIR/handlers" "$ROOT_DIR/pkg" "$ROOT_DIR/main.g # Copy source files, excluding .git and keeping patches/ and scripts/ rsync -a --stats --exclude='.git' "$SUBMODULE_DIR/" "$ROOT_DIR/" \ - --exclude='patches' --exclude='scripts' --exclude='README.md' --exclude='Dockerfile' + --exclude='patches' --exclude='scripts' --exclude='README.md' --exclude='Dockerfile' --exclude='LICENSE' # Remove scripts/ from .gitignore so we can track our sync script sed -i '/^scripts\/$/d' "$ROOT_DIR/.gitignore" diff --git a/telegram-join-approval-bot b/telegram-join-approval-bot index 4f3a0b9..98e6a4a 160000 --- a/telegram-join-approval-bot +++ b/telegram-join-approval-bot @@ -1 +1 @@ -Subproject commit 4f3a0b9b06c097480e161d5351dcce50ea0692d0 +Subproject commit 98e6a4a100cb350cadc0a074894bb2fb0b0c9394 From 5d97a5f593d3d024e08e8d7f04cecedc677f0ffc Mon Sep 17 00:00:00 2001 From: Astra Date: Tue, 10 Mar 2026 07:33:56 +0000 Subject: [PATCH 2/2] Require sync.sh to be run from scripts/ directory --- scripts/sync.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/scripts/sync.sh b/scripts/sync.sh index 6308b94..ffcc7ae 100755 --- a/scripts/sync.sh +++ b/scripts/sync.sh @@ -1,9 +1,16 @@ #!/usr/bin/env bash # sync.sh — Copy telegram-join-approval-bot submodule into internal/, then apply patches. -# Usage: ./scripts/sync.sh +# Usage: cd scripts/ && ./sync.sh set -euo pipefail +# Ensure script is run from the scripts/ directory +if [[ "$(basename "$PWD")" != "scripts" ]]; then + echo "❌ This script must be run from the scripts/ directory." + echo " Usage: cd scripts/ && ./sync.sh" + exit 1 +fi + SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" ROOT_DIR="$(cd "$SCRIPT_DIR/.." && pwd)"