diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000..09bf874 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,10 @@ +{ + "name": "Hermes-Agent", + "customizations": { + "vscode": { + "extensions": ["saoudrizwan.claude-dev","joaompfp.hermes-ai-agent"] + } + }, + "postCreateCommand": "bash ./.devcontainer/post-create-cmd.sh", + "postStartCommand": "bash -c \"echo '[post-start-cmd.sh] Container started' >> /tmp/post-start-cmd.log\"" +} \ No newline at end of file diff --git a/.devcontainer/post-create-cmd.sh b/.devcontainer/post-create-cmd.sh new file mode 100644 index 0000000..be15d89 --- /dev/null +++ b/.devcontainer/post-create-cmd.sh @@ -0,0 +1,27 @@ +#!/bin/bash + +# Install modelrelay globally +sudo npm install modelrelay -g --prefix /usr/local/lib/modelrelay +sudo ln -sf /usr/local/lib/modelrelay/bin/modelrelay /usr/local/bin/modelrelay +sudo npm cache clean --force + +echo "[post-create-cmd.sh] Starting modelrelay in the background..." +if command -v modelrelay &>/dev/null; then + setsid /usr/local/bin/modelrelay >> /tmp/modelrelay.log 2>&1 & +else + echo "[post-create-cmd.sh] modelrelay not found, skipping start" +fi + +# Install hermes-agent +HERMES_VERSION="v2026.5.7" +curl -fsSL "https://raw.githubusercontent.com/NousResearch/hermes-agent/${HERMES_VERSION}/scripts/install.sh" | bash -s -- --skip-setup +npm cache clean --force +sudo rm -rf /var/lib/apt/lists/* + +# Configure hermes defaults if first run +if command -v hermes &>/dev/null && [ -d "$HOME/.hermes/sessions" ] && [ -z "$(ls -A "$HOME/.hermes/sessions")" ]; then + echo "[post-create-cmd.sh] No sessions found, setting up default configuration for custom provider" + hermes config set model.provider custom + hermes config set model.base_url http://localhost:7352/v1 + hermes config set model.default auto-fastest +fi \ No newline at end of file diff --git a/README.md b/README.md index 696e2f0..82ed9d2 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ ![GitHub Release](https://img.shields.io/github/v/release/gitricko/sonarless) ![GitHub commits since latest release](https://img.shields.io/github/commits-since/gitricko/sonarless/latest) -# Sonarless v1.3 +# Sonarless v1.4 This developer-friendly CLI and GitHub Action enable SonarQube scanning for your repository without the need for a dedicated hosted SonarQube server. It starts a SonarQube Docker instance, allowing developers to scan code, check results, and generate a JSON metrics file for automation. This ensures you can easily assess and maintain the quality of your code. @@ -62,7 +62,7 @@ This CLI works perfectly with Github CodeSpace ```yaml -- uses: gitricko/sonarless@v1.3 +- uses: gitricko/sonarless@v1.4 with: # Folder path to scan from git-root # Default: . diff --git a/makefile.sh b/makefile.sh index d13f654..1e7754c 100755 --- a/makefile.sh +++ b/makefile.sh @@ -9,8 +9,8 @@ export SONAR_SOURCE_PATH=${SONAR_SOURCE_PATH:-"."} export SONAR_METRICS_PATH=${SONAR_METRICS_PATH:-"./sonar-metrics.json"} export SONAR_EXTENSION_DIR="${HOME}/.sonarless/extensions" -export DOCKER_SONAR_CLI=${DOCKER_SONAR_CLI:-"sonarsource/sonar-scanner-cli:11.3"} -export DOCKER_SONAR_SERVER=${DOCKER_SONAR_SERVER:-"sonarqube:25.5.0.107428-community"} +export DOCKER_SONAR_CLI=${DOCKER_SONAR_CLI:-"sonarsource/sonar-scanner-cli:12.1"} +export DOCKER_SONAR_SERVER=${DOCKER_SONAR_SERVER:-"sonarqube:26.4.0.121862-community"} export CLI_NAME="sonarless"