2.2 KiB
Agent Instructions for GitHub Binary Installers
When to Use the Installer Creation Guide
When a user requests the creation of an installer script for a binary hosted on GitHub releases, follow these steps:
-
Check Existing Installers: First, verify if an installer for the requested tool already exists in the repository by checking the project files.
-
Use the Guide: If no installer exists, use the
INSTALLER_CREATION_GUIDE.mdas the primary reference for creating the new installer. -
Follow the Template: Strictly adhere to the structure, functions, and patterns outlined in the guide. Do not deviate from the established conventions.
-
Adapt Placeholders: Replace all placeholders (
[tool],[Tool Name],[TOOL],[owner]/[repo]) with the actual values for the requested binary. -
Verify GitHub Releases: Ensure the binary naming convention and download URLs match the actual GitHub release assets.
-
Test the Script: After creation, the script should be tested to ensure it works correctly on the target systems.
-
Update Documentation: Add appropriate usage examples and next steps specific to the tool being installed.
Key Requirements
- System-Wide Preference: Always prefer system-wide installation (
/usr/local/bin) over user-specific installation. - Binary-Only: Disable package manager installation to ensure the latest version from GitHub is used.
- Version Management: Implement proper version symlinks for multiple version support.
- Conflict Resolution: Detect and offer to remove conflicting user bin installations.
- Command-Line Options: Support
--version,--force, and--reinstalloptions. - Error Handling: Include comprehensive error checking and user-friendly messages.
File Naming Convention
Name the installer script as install-[tool-name].sh (e.g., install-my-tool.sh).
Integration
After creating the installer:
- Add it to the repository
- Update any relevant README files to reference the new installer
- Ensure the script is executable (
chmod +x install-[tool-name].sh)
Reference
See INSTALLER_CREATION_GUIDE.md for complete implementation details and code templates.
AGENTS.md