Compare commits

...

3 Commits

Author SHA1 Message Date
c1fd0c8d7d 🔖 chore: atualizar Cargo.lock para versão 0.2.4
Some checks failed
continuous-integration/drone/push Build is failing
2026-02-28 22:20:45 -03:00
b194cf84e5 🔧 chore: adicionar drone-ci-mcp e corrigir formato do hook PostToolUse 2026-02-28 22:20:42 -03:00
5b5f6a3020 🐛 fix(ci): usar base64 -w 0 e POST/PUT correto no upload do badge 2026-02-28 22:20:40 -03:00
4 changed files with 29 additions and 11 deletions

View File

@ -3,9 +3,13 @@
"PostToolUse": [
{
"matcher": "Write|Edit",
"type": "command",
"command": "bash -c 'if [ -f Cargo.toml ]; then if command -v cargo-nextest >/dev/null 2>&1; then cargo nextest run 2>&1; else cargo test 2>&1; fi; fi'",
"timeout": 120
"hooks": [
{
"type": "command",
"command": "bash -c 'if [ -f Cargo.toml ]; then if command -v cargo-nextest >/dev/null 2>&1; then cargo nextest run 2>&1; else cargo test 2>&1; fi; fi'",
"timeout": 120
}
]
}
]
}

View File

@ -32,8 +32,7 @@ steps:
else COLOR="red"; fi
curl -sf "https://img.shields.io/badge/coverage-${PCT}%25-${COLOR}.svg" -o coverage.svg
- |
ls -la coverage.svg
CONTENT=$(openssl base64 -in coverage.svg -A)
CONTENT=$(base64 -w 0 coverage.svg)
echo "Content length: ${#CONTENT}"
SHA_RESP=$(curl -s \
-H "Authorization: token $GITEA_TOKEN" \
@ -45,16 +44,21 @@ steps:
PAYLOAD=$(jq -n --arg msg "ci: update coverage badge [CI SKIP]" \
--arg content "$CONTENT" --arg sha "$SHA" --arg branch "master" \
'{message: $msg, content: $content, sha: $sha, branch: $branch}')
RESPONSE=$(curl -s -X PUT \
-H "Authorization: token $GITEA_TOKEN" \
-H "Content-Type: application/json" \
"https://git.cincoeuzebio.com/api/v1/repos/cinco/Tmuxido/contents/badges/coverage.svg" \
-d "$PAYLOAD")
else
PAYLOAD=$(jq -n --arg msg "ci: add coverage badge [CI SKIP]" \
--arg content "$CONTENT" --arg branch "master" \
'{message: $msg, content: $content, branch: $branch}')
RESPONSE=$(curl -s -X POST \
-H "Authorization: token $GITEA_TOKEN" \
-H "Content-Type: application/json" \
"https://git.cincoeuzebio.com/api/v1/repos/cinco/Tmuxido/contents/badges/coverage.svg" \
-d "$PAYLOAD")
fi
RESPONSE=$(curl -s -X PUT \
-H "Authorization: token $GITEA_TOKEN" \
-H "Content-Type: application/json" \
"https://git.cincoeuzebio.com/api/v1/repos/cinco/Tmuxido/contents/badges/coverage.svg" \
-d "$PAYLOAD")
echo "API response: $RESPONSE"
echo "$RESPONSE" | jq -e '.content.sha' > /dev/null

View File

@ -9,6 +9,16 @@
"type": "stdio",
"command": "crates-mcp",
"args": []
},
"drone-ci-mcp": {
"command": "npx",
"args": [
"-y",
"drone-ci-mcp",
"--access-token=${DRONE_TOKEN}",
"--server-url=https://drone.cincoeuzebio.com"
]
}
}
}

2
Cargo.lock generated
View File

@ -542,7 +542,7 @@ dependencies = [
[[package]]
name = "tmuxido"
version = "0.2.0"
version = "0.2.4"
dependencies = [
"anyhow",
"clap",