From 45b867aec5cb01cf1fb44ae301a6aef873bc15cc Mon Sep 17 00:00:00 2001 From: Sebastian Lorenz Date: Thu, 16 Apr 2026 10:25:35 +0200 Subject: [PATCH] refactor: remove install script The install script has been moved to the amp-docs repository --- .agents/skills/code-check/SKILL.md | 15 ----- .agents/skills/code-format/SKILL.md | 6 -- .editorconfig | 2 +- AGENTS.md | 1 - install | 90 ----------------------------- justfile | 74 ------------------------ 6 files changed, 1 insertion(+), 187 deletions(-) delete mode 100755 install diff --git a/.agents/skills/code-check/SKILL.md b/.agents/skills/code-check/SKILL.md index eae9e97..208645a 100644 --- a/.agents/skills/code-check/SKILL.md +++ b/.agents/skills/code-check/SKILL.md @@ -39,14 +39,6 @@ Examples: - `just clippy` - lint all code - `just clippy -- -D warnings` - treat warnings as errors -### Check Shell Scripts -```bash -just check-sh -``` -Lints shell scripts. Currently checks the `install` script. - -**Requirements**: Requires `shellcheck` to be installed. The command will provide installation instructions if not available. - ## Important Guidelines ### MANDATORY: Run Checks After Changes @@ -65,13 +57,6 @@ Before considering a task complete: all checks MUST pass AND all clippy warnings - If warnings → fix ALL → return to step 2 5. Repeat until: zero compilation errors AND zero clippy warnings -**Shell script (install script):** -1. Edit the `install` script -2. Format: use `/code-format` skill (run `just fmt-sh`) -3. **Check shellcheck**: `just check-sh` - - If warnings → fix ALL → return to step 2 -4. Repeat until: zero shellcheck warnings - ## Common Mistakes to Avoid ### ❌ Anti-patterns diff --git a/.agents/skills/code-format/SKILL.md b/.agents/skills/code-format/SKILL.md index d8920b6..738bce2 100644 --- a/.agents/skills/code-format/SKILL.md +++ b/.agents/skills/code-format/SKILL.md @@ -95,11 +95,6 @@ This is a critical requirement from the project's development workflow: 2. When ready to validate, run: `just fmt-rs` 3. Then run checks -**Shell script edit:** -1. Edit the `install` script -2. When ready to validate, run: `just fmt-sh` -3. Then run checks - ## Common Mistakes to Avoid ### ❌ Anti-patterns @@ -114,7 +109,6 @@ This is a critical requirement from the project's development workflow: - Format before running checks/tests or before committing - Use `just fmt-rs-file` for 1-2 files (faster, targeted) - Use `just fmt-rs` for 3+ files (more efficient) -- Use `just fmt-sh` after editing the `install` script - Run format check commands to verify formatting before commits ## Next Steps diff --git a/.editorconfig b/.editorconfig index eee8ca3..ab5427c 100644 --- a/.editorconfig +++ b/.editorconfig @@ -12,7 +12,7 @@ trim_trailing_whitespace = true indent_size = 2 # Tabs required for <<-EOF heredoc indent stripping -[{*.sh,install}] +[{*.sh}] indent_style = tab shell_variant = bash binary_next_line = true diff --git a/AGENTS.md b/AGENTS.md index a46af73..3588529 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -361,7 +361,6 @@ For more detailed information about the project: - `rust-toolchain.toml` — Pins Rust 1.92.0 - `rustfmt.toml` — Formatting config (nightly features) - `justfile` — Task runner commands -- `install` — Platform-agnostic installer script (root level) ### Documentation diff --git a/install b/install deleted file mode 100755 index 4adc754..0000000 --- a/install +++ /dev/null @@ -1,90 +0,0 @@ -#!/usr/bin/env bash - -# This is just a little script that can be downloaded from the internet to -# install `ampup`. It just does platform detection, downloads the installer -# and runs it. - -main() { - require uname curl mktemp chmod rm rmdir - - local platform - platform="$(get_platform)" - local arch - arch="$(get_architecture)" - info "Downloading ampup" - detail "Platform: ${platform}, Architecture: ${arch}" - - # Download - local tmpdir - tmpdir="$(ensure mktemp -d)" - local tmpbin="${tmpdir}/ampup" - download_asset "ampup-${platform}-${arch}" "${tmpbin}" - - # Initialize - ensure chmod +x "${tmpbin}" - ensure "${tmpbin}" init "$@" - - # Cleanup - ignore rm "${tmpbin}" - ignore rmdir "${tmpdir}" -} - -download_asset() { - local artifact="$1" - local output="$2" - local url="https://github.com/edgeandnode/ampup/releases/latest/download/${artifact}" - ensure curl --proto =https --tlsv1.2 --silent --show-error --fail --location "${url}" --output "${output}" -} - -get_platform() { - local platform - platform="$(ensure uname -s)" - case ${platform} in - Linux) echo "linux" ;; - Darwin) echo "darwin" ;; - *) die "Unsupported platform: ${platform}" ;; - esac -} - -get_architecture() { - local arch - arch="$(ensure uname -m)" - case ${arch} in - x86_64 | amd64) echo "x86_64" ;; - arm64 | aarch64) echo "aarch64" ;; - *) die "Unsupported architecture: ${arch}" ;; - esac -} - -info() { - printf "\033[0;36m→\033[0m %s\n" "$1" -} - -detail() { - printf "\033[0;2m %s\033[0m\n" "$1" -} - -error() { - printf "\033[0;31;1m✗\033[0m %s\n" "$1" >&2 -} - -require() { - for cmd in "$@"; do - command -v "${cmd}" >/dev/null 2>&1 || die "Required command not found: ${cmd}" - done -} - -ensure() { - "$@" || die "Command failed: $*" -} - -ignore() { - "$@" -} - -die() { - error "$1" - exit 1 -} - -main "$@" diff --git a/justfile b/justfile index b2ca15a..4e734ea 100644 --- a/justfile +++ b/justfile @@ -33,55 +33,6 @@ fmt-rs-check: fmt-rs-file FILE: cargo +nightly fmt -- {{FILE}} -# Format shell scripts (shfmt) -[group: 'format'] -fmt-sh: - #!/usr/bin/env bash - set -e # Exit on error - - # Check if shfmt is installed - if ! command -v "shfmt" &> /dev/null; then - >&2 echo "==============================================================" - >&2 echo "Required command 'shfmt' not available" - >&2 echo "" - >&2 echo "Please install shfmt using your preferred package manager:" - >&2 echo " brew install shfmt" - >&2 echo " apt-get install shfmt" - >&2 echo " pacman -S shfmt" - >&2 echo " go install mvdan.cc/sh/v3/cmd/shfmt@latest" - >&2 echo "" - >&2 echo "See: https://github.com/mvdan/sh" - >&2 echo "==============================================================" - exit 1 - fi - - shfmt --write install - -# Check shell scripts format (shfmt --diff) -[group: 'format'] -fmt-sh-check: - #!/usr/bin/env bash - set -e # Exit on error - - # Check if shfmt is installed - if ! command -v "shfmt" &> /dev/null; then - >&2 echo "==============================================================" - >&2 echo "Required command 'shfmt' not available" - >&2 echo "" - >&2 echo "Please install shfmt using your preferred package manager:" - >&2 echo " brew install shfmt" - >&2 echo " apt-get install shfmt" - >&2 echo " pacman -S shfmt" - >&2 echo " go install mvdan.cc/sh/v3/cmd/shfmt@latest" - >&2 echo "" - >&2 echo "See: https://github.com/mvdan/sh" - >&2 echo "==============================================================" - exit 1 - fi - - shfmt --diff install - - ## Check alias check := check-rs @@ -96,31 +47,6 @@ check-rs *EXTRA_FLAGS: clippy *EXTRA_FLAGS: cargo clippy --all-targets {{EXTRA_FLAGS}} -# Lint shell scripts (shellcheck) -[group: 'check'] -check-sh: - #!/usr/bin/env bash - set -e # Exit on error - - # Check if shellcheck is installed - if ! command -v "shellcheck" &> /dev/null; then - >&2 echo "==============================================================" - >&2 echo "Required command 'shellcheck' not available" - >&2 echo "" - >&2 echo "Please install shellcheck using your preferred package manager:" - >&2 echo " brew install shellcheck" - >&2 echo " apt-get install shellcheck" - >&2 echo " dnf install ShellCheck" - >&2 echo " pacman -S shellcheck" - >&2 echo "" - >&2 echo "See: https://github.com/koalaman/shellcheck" - >&2 echo "==============================================================" - exit 1 - fi - - shellcheck -x -o all -S style install - - ## Build alias build := build-ampup