feat: installation & distribution overhaul#83
Open
brian-lai wants to merge 11 commits into
Open
Conversation
- check_for_updates: write timestamp only after successful API response - check_for_updates: suppress nag for dev builds (version looks like '(abc1234)') - install-binary.sh: gate read prompt behind [[ -t 0 ]] to fix curl|bash pipe - install-binary.sh: prefer re-download over cp "$0" for pipe installs - packaging/deb/postinst: resolve actual user home via SUDO_USER for dpkg root runs - Makefile: use git describe --abbrev=0 to avoid dirty suffix in VERSION file - Formula/codetect.rb: wrap post_install in rescue so write failure is non-fatal - cmd_update go branch: clarify only codetect-mcp is updated via go install
- postinst: don't use XDG_CONFIG_HOME under sudo (belongs to root not SUDO_USER) - build-deb.sh: add --abbrev=0 fallback to VERSION detection (consistent with Makefile) - check_for_updates: replace (( )) arithmetic with [[ $(( )) -ge ]] to avoid set -e exit on zero - install-binary.sh: document that non-interactive curl|bash defaults to adding PATH - Formula/codetect.rb: add TODO comment on sha256 placeholder line
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
~/.config/codetect/install_method(git/brew/binary) socodetect updateknows how to update itselfcheck_for_updates()in the wrapper hits the GitHub releases API once per 24 hours (3s timeout, silent on failure) and prints a one-line notice to stderr when a newer version is available; skipped for themcpcommandcodetect updateoverhaul — detects install method and dispatches to the right updater:brew upgrade codetect,go install ...@latest,install-binary.sh, or the existing git-cloneupdate.sh; falls back gracefully with new install instructions when method is unknownscripts/install-binary.sh— new curl one-liner installer with OS/arch detection, GitHub Releases download, SHA256 checksum verification, PATH setup, and marker file writeFormula/codetect.rb— Homebrew formula withpost_installmarker write (canonical version lives in a separatehomebrew-taprepo; SHA256 placeholder needs updating on each release)packaging/deb/— Debian control file,postinstmarker script, andbuild-deb.shfor producing.debrelease artifactsGodemoted to build-from-source only)Notes
sha256is a placeholder — update it with the real tarball SHA256 when cutting a release.debinstall paths depend on pre-built binaries being attached to GitHub Releases; a goreleaser workflow (future work) would automate thiscmd_version()now reads~/.local/share/codetect/VERSIONas a fallback for brew/binary installs where no git repo is presentTest plan
install.shand verify~/.config/codetect/install_methodcontainsgitcodetect versionandcodetect index— confirm one-line update notice appears after clearinglast_update_check; confirm it is suppressed on repeat runs within 24hinstall_methodvalue and verifycodetect updatedispatches to the correct handlercodetect updatewith no marker file and no GOPATH match falls back toupdate.shwith the new error message🤖 Generated with Claude Code