feat: switch to opencode
This commit is contained in:
Executable
+8
@@ -0,0 +1,8 @@
|
||||
#!/bin/sh
|
||||
set -eu
|
||||
|
||||
script_dir=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)
|
||||
cd "$script_dir/.."
|
||||
|
||||
export OPENCODE_REFRESH="$(date +%s)-$$"
|
||||
exec docker compose build "$@"
|
||||
@@ -1,12 +1,18 @@
|
||||
#!/bin/sh
|
||||
set -eu
|
||||
|
||||
python -c '
|
||||
if [ -f "${OPENCODE_SERVER_PASSWORD_FILE:-}" ]; then
|
||||
export OPENCODE_SERVER_PASSWORD
|
||||
OPENCODE_SERVER_PASSWORD=$(cat "$OPENCODE_SERVER_PASSWORD_FILE")
|
||||
fi
|
||||
|
||||
if [ -f "${AGENTCI_GITEA_TOKEN_FILE:-/run/secrets/gitea_token}" ]; then
|
||||
python -c '
|
||||
import json
|
||||
import os
|
||||
from pathlib import Path
|
||||
|
||||
config_dir = Path(os.environ["XDG_CONFIG_HOME"]) / "tea"
|
||||
config_dir = Path(os.environ.get("AGENTCI_TEA_CONFIG_HOME", "/run/agentci")) / "tea"
|
||||
config_dir.mkdir(parents=True, exist_ok=True)
|
||||
config_path = config_dir / "config.yml"
|
||||
token_path = Path(
|
||||
@@ -22,5 +28,6 @@ login = {
|
||||
config_path.write_text(json.dumps({"logins": [login], "preferences": {}}))
|
||||
config_path.chmod(0o600)
|
||||
'
|
||||
fi
|
||||
|
||||
exec "$@"
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
#!/bin/sh
|
||||
set -eu
|
||||
|
||||
export XDG_CONFIG_HOME="${AGENTCI_TEA_CONFIG_HOME:-/run/agentci}"
|
||||
exec /usr/local/libexec/tea "$@"
|
||||
Reference in New Issue
Block a user