Skip to content

Commit 04c495f

Browse files
committed
ci: make release scripts work in standalone checkout
1 parent 7c19986 commit 04c495f

5 files changed

Lines changed: 40 additions & 15 deletions

File tree

scripts/check_release_versions.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
#!/usr/bin/env bash
22
set -euo pipefail
33

4-
ROOT="$(cd "$(dirname "$0")/../../.." && pwd)"
5-
WORKSPACE="$ROOT/crates/code"
4+
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
5+
WORKSPACE="$(cd "$SCRIPT_DIR/.." && pwd)"
66

77
cd "$WORKSPACE"
88

scripts/kimi_core_coverage.sh

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,15 @@
11
#!/usr/bin/env bash
22
set -euo pipefail
33

4-
ROOT="$(cd "$(dirname "$0")/../../.." && pwd)"
5-
WORKSPACE="$ROOT/crates/code"
6-
CONFIG_FILE="${A3S_CONFIG_FILE:-$ROOT/.a3s/config.acl}"
4+
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
5+
WORKSPACE="$(cd "$SCRIPT_DIR/.." && pwd)"
6+
MONOREPO_ROOT="$(cd "$WORKSPACE/../../.." && pwd)"
7+
if [ -f "$MONOREPO_ROOT/.a3s/config.acl" ]; then
8+
CONFIG_ROOT="$MONOREPO_ROOT"
9+
else
10+
CONFIG_ROOT="$WORKSPACE"
11+
fi
12+
CONFIG_FILE="${A3S_CONFIG_FILE:-$CONFIG_ROOT/.a3s/config.acl}"
713
TARGET_DIR="${TARGET_DIR:-$WORKSPACE/target/coverage-kimi}"
814
PROF_DIR="${PROF_DIR:-$TARGET_DIR/profraw}"
915
PROFDATA="${PROFDATA:-$TARGET_DIR/a3s-code-core.profdata}"
@@ -26,7 +32,7 @@ if [ "$REPORT_ONLY" != "1" ]; then
2632
cargo test -p a3s-code-core --lib --manifest-path "$WORKSPACE/Cargo.toml" --target-dir "$TARGET_DIR"
2733

2834
echo "[2/4] Running real provider ACL env integration smoke test"
29-
"$ROOT/crates/code/scripts/real_config_env_integration.sh"
35+
"$WORKSPACE/scripts/real_config_env_integration.sh"
3036
else
3137
echo "[1/4] Skipping test execution (REPORT_ONLY=1)"
3238
echo "[2/4] Reusing existing coverage artifacts"

scripts/minimax_prompt_smoke.sh

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,15 @@
11
#!/usr/bin/env bash
22
set -euo pipefail
33

4-
ROOT="$(cd "$(dirname "$0")/../../.." && pwd)"
5-
CONFIG_FILE="${A3S_CONFIG_FILE:-$ROOT/.a3s/config.acl}"
4+
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
5+
WORKSPACE="$(cd "$SCRIPT_DIR/.." && pwd)"
6+
MONOREPO_ROOT="$(cd "$WORKSPACE/../../.." && pwd)"
7+
if [ -f "$MONOREPO_ROOT/.a3s/config.acl" ]; then
8+
CONFIG_ROOT="$MONOREPO_ROOT"
9+
else
10+
CONFIG_ROOT="$WORKSPACE"
11+
fi
12+
CONFIG_FILE="${A3S_CONFIG_FILE:-$CONFIG_ROOT/.a3s/config.acl}"
613

714
if [ ! -f "$CONFIG_FILE" ]; then
815
echo "config file not found: $CONFIG_FILE" >&2
@@ -24,4 +31,4 @@ fi
2431

2532
echo "Running real MiniMax/OpenAI-compatible smoke through .a3s/config.acl"
2633
echo "Config: $CONFIG_FILE"
27-
A3S_CONFIG_FILE="$CONFIG_FILE" "$ROOT/crates/code/scripts/real_config_env_integration.sh"
34+
A3S_CONFIG_FILE="$CONFIG_FILE" "$WORKSPACE/scripts/real_config_env_integration.sh"

scripts/real_config_env_integration.sh

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,15 @@
11
#!/usr/bin/env bash
22
set -euo pipefail
33

4-
ROOT="$(cd "$(dirname "$0")/../../.." && pwd)"
5-
WORKSPACE="$ROOT/crates/code"
6-
CONFIG_FILE="${A3S_CONFIG_FILE:-$ROOT/.a3s/config.acl}"
4+
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
5+
WORKSPACE="$(cd "$SCRIPT_DIR/.." && pwd)"
6+
MONOREPO_ROOT="$(cd "$WORKSPACE/../../.." && pwd)"
7+
if [ -f "$MONOREPO_ROOT/.a3s/config.acl" ]; then
8+
CONFIG_ROOT="$MONOREPO_ROOT"
9+
else
10+
CONFIG_ROOT="$WORKSPACE"
11+
fi
12+
CONFIG_FILE="${A3S_CONFIG_FILE:-$CONFIG_ROOT/.a3s/config.acl}"
713
MODE="${1:-real}"
814

915
if [ "$MODE" != "real" ] && [ "$MODE" != "--dry-run" ]; then

scripts/release_preflight.sh

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,14 @@
11
#!/usr/bin/env bash
22
set -euo pipefail
33

4-
ROOT="$(cd "$(dirname "$0")/../../.." && pwd)"
5-
WORKSPACE="$ROOT/crates/code"
4+
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
5+
WORKSPACE="$(cd "$SCRIPT_DIR/.." && pwd)"
6+
MONOREPO_ROOT="$(cd "$WORKSPACE/../../.." && pwd)"
7+
if [ -f "$MONOREPO_ROOT/.a3s/config.acl" ]; then
8+
CONFIG_ROOT="$MONOREPO_ROOT"
9+
else
10+
CONFIG_ROOT="$WORKSPACE"
11+
fi
612

713
cd "$WORKSPACE"
814

@@ -38,7 +44,7 @@ echo "[10/11] Checking ACL env injection dry run"
3844
scripts/real_config_env_integration.sh --dry-run
3945

4046
echo "[11/11] Checking real-provider ACL env smoke availability"
41-
CONFIG_FILE="${A3S_CONFIG_FILE:-$ROOT/.a3s/config.acl}"
47+
CONFIG_FILE="${A3S_CONFIG_FILE:-$CONFIG_ROOT/.a3s/config.acl}"
4248
CONFIG_HAS_LITERAL_OPENAI_CREDS=0
4349
if [ -f "$CONFIG_FILE" ]; then
4450
CONFIG_HAS_LITERAL_OPENAI_CREDS="$(

0 commit comments

Comments
 (0)