Replace custom build_lib.sh with canonical hero_lib copy + standardize Makefile #4
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Context
scripts/build_lib.shis a ~18-line custom shim that just runscargo build --workspace --release. The canonicalhero_libbuild library providesbuild_binaries,install_binaries,cargo_env,publish_binaries,forge_config, andhero_service_stop— thebuild_lib/makefile_helperskills require we source it. The currentMakefilealso lacksSHELL := /bin/bash,CARGO_ENV, and standard targets (test-all,ci-local,ci-docker,ship-binary,installdev,status,version).Makefiletargets use rawsocat/pkillfor stop/status.Goals
scripts/build_lib.shwith the canonical copy fromlhumina_code/hero_lib(or sync script that pulls it).scripts/ci-docker.shfor local CI replication.Makefile:SHELL := /bin/bash,BUILD_LIB := scripts/build_lib.sh,CARGO_ENV := source $(BUILD_LIB) && cargo_env &&.build,installdev(debug),install(release),run,stop,status,version,fmt,fmt-check,clippy,test,test-all,ci-local,ci-docker,ship-binary,release,logs-server,logs-ui,clean.socat+pkill; delegate stop/status to the CLI /hero_proc(see #1).buildenv.sh: addDOCKER_LINUX_BUILD, ensureBINARIESlists all produced binaries including the CLI (#1) andhero_do_hero_livekitonce added.Related skills:
build_lib,build_lib_ci,makefile_helper,makefile_helper_ci.Implementation Spec for Issue #4
Objective
Replace the naive
scripts/build_lib.shwith the canonical version from hero_os/hero_lib, standardize the Makefile withSHELL := /bin/bash,BUILD_LIB,CARGO_ENV, and all standard targets, create CI helper scripts, and updatebuildenv.sh.Requirements
scripts/build_lib.shwith canonical version (forge_config, build_binaries, publish_binaries, cargo_env, etc.)SHELL := /bin/bash,BUILD_LIB,CARGO_ENVpatterninstallto build release (currently builds debug)scripts/ci-local.sh,scripts/ci-docker.sh,scripts/ci-patch-deps.shbuildenv.sh: addDOCKER_LINUX_BUILD, use${INSTALL_DIR:-...}patternFiles to Modify/Create
buildenv.sh- Add DOCKER_LINUX_BUILD, fix INSTALL_DIR patternMakefile- Full rewrite with canonical structurescripts/build_lib.sh- Replace with canonical version from hero_osscripts/ci-local.sh- New: CI without workspace overridesscripts/ci-docker.sh- New: CI in Docker containerscripts/ci-patch-deps.sh- New: Cross-repo dep patching for feature branchesImplementation Plan
Step 1: Update buildenv.sh + Replace build_lib.sh
Files:
buildenv.sh,scripts/build_lib.sh${INSTALL_DIR:-$HOME/hero/bin}patternDependencies: none
Step 2: Rewrite Makefile
Files:
MakefileDependencies: Step 1
Step 3: Create CI scripts
Files:
scripts/ci-local.sh,scripts/ci-docker.sh,scripts/ci-patch-deps.shDependencies: Step 2 (references make targets)
Acceptance Criteria
Notes
Test Results
All workspace tests pass after Makefile standardization and build_lib.sh replacement.
Implementation Summary
Changes Made
buildenv.sh
scripts/build_lib.sh
Makefile (full rewrite)
scripts/ci-local.sh (new)
scripts/ci-docker.sh (new)
scripts/ci-patch-deps.sh (new)
Test Results