'Generic Commit'
Some checks failed
Build-Test-Publish / build (push) Failing after 10s

This commit is contained in:
Your Name 2025-06-15 19:08:50 +12:00
parent 24b4ea6e22
commit 61bb5d1de1
3 changed files with 77 additions and 2 deletions

71
CLAUDE.md Normal file
View File

@ -0,0 +1,71 @@
# CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
## Project Overview
This repository contains Dropshell Tools - a collection of utilities that support dropshell development. The main tool is `dropshell-tool`, a C++ command-line application that manages tool installation, updates, and publishing for the dropshell ecosystem.
## Architecture
### Core Components
- **dropshell-tool**: Main C++ application (`dropshell-tool/src/`)
- `main.cpp`: CLI interface and command routing
- `ArchiveManager`: Handles .tgz archive creation/extraction
- `BashrcEditor`: Manages ~/.bashrc_dropshell_tool script modifications
- `DropshellScriptManager`: Manages tool installation and configuration
- `GetbinClient`: HTTP client for downloading/uploading tools
- **sos**: Simple object storage utility
- **whatsdirty**: Git repository status checker
### Build System
- Uses CMake with C++23 standard
- Docker-based builds with static linking
- Uses external build base image `gitea.jde.nz/public/dropshell-build-base:latest`
- Versioning based on timestamp format YYYY.MMDD.HHMM
## Common Commands
### Build Tools
```bash
# Build all tools (includes install from getbin.xyz)
./buildtestpublish_all.sh
# Build specific tool (dropshell-tool)
cd dropshell-tool && ./build.sh
# Test specific tool
cd dropshell-tool && ./test.sh
# Publish specific tool (requires SOS_WRITE_TOKEN)
cd dropshell-tool && ./publish.sh
```
### Development Workflow
```bash
# Check status of all git repositories
./whatsdirty/whatsdirty.sh
# Build debug version (default in build.sh)
export CMAKE_BUILD_TYPE="Debug"
# Build release version (used in publish.sh)
export CMAKE_BUILD_TYPE="Release"
```
## Tool Functionality
dropshell-tool manages a tool ecosystem by:
- Installing tools to `~/.local/bin/dropshell-tool/<tool_name>/`
- Managing bash completions and aliases via `~/.bashrc_dropshell_tool`
- Storing tool metadata in `~/.config/dropshell-tool/`
- Publishing/downloading tools via getbin.xyz object storage
Each tool includes a `dropshell-tool-config.json` with aliases and setup scripts.
## Publishing Requirements
Publishing requires the `SOS_WRITE_TOKEN` environment variable for authentication to the object storage system.

View File

@ -43,4 +43,4 @@ chmod +x "${SOS}"
"${SOS}" upload "getbin.xyz" "${SCRIPT_DIR}/output/${PROJECT}" "${PROJECT}:latest-${ARCH}"
# upload generic install script (ok if multiple times as we iterate through arch's)
"${SOS}" upload "getbin.xyz" "${SCRIPT_DIR}/install.sh" "${PROJECT}-install:latest"
"${SOS}" upload "getbin.xyz" "${SCRIPT_DIR}/install.sh" "${PROJECT}-install:latest"

View File

@ -84,7 +84,11 @@ bool GetbinClient::upload(const std::string& archivePath, std::string& outUrl, s
client->sendRequest(req, [&](drogon::ReqResult result, const drogon::HttpResponsePtr& response) {
if (result != drogon::ReqResult::Ok || !response) {
std::cerr << "[GetbinClient::upload] HTTP request failed (no response)." << std::endl;
std::cerr << "[GetbinClient::upload] HTTP /upload request failed (did not get OK response)." << std::endl;
if (response) {
std::cerr << response->getStatusCode() << std::endl;
std::cerr << response->getBody() << std::endl;
}
return;
}