refactor: rename CLI binary from lab to labctl
Updated everywhere: constants, package.json bin, completions, nfpm packaging, build scripts, CI, banner text. Binary is now /usr/bin/labctl. Internal package names (@lab/*) unchanged. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -22,7 +22,7 @@ usage() {
|
||||
cat <<EOF
|
||||
Usage: $(basename "$0") [OPTIONS]
|
||||
|
||||
Build lab binary and produce RPM/DEB packages.
|
||||
Build labctl binary and produce RPM/DEB packages.
|
||||
|
||||
Options:
|
||||
--arch ARCH Target architecture: x86_64 or arm64 (default: host arch)
|
||||
@@ -106,7 +106,7 @@ build_arch() {
|
||||
|
||||
bun_target="$(bun_target_for "$arch")"
|
||||
nfpm_arch="$(nfpm_arch_for "$arch")"
|
||||
binary_name="dist/lab-${arch}"
|
||||
binary_name="dist/labctl-${arch}"
|
||||
|
||||
echo ""
|
||||
echo "==> Bundling standalone binary for ${arch}..."
|
||||
@@ -117,7 +117,7 @@ build_arch() {
|
||||
local tmpconfig
|
||||
tmpconfig="$(mktemp /tmp/nfpm-XXXXXX.yaml)"
|
||||
sed -e "s|^arch:.*|arch: ${nfpm_arch}|" \
|
||||
-e "s|src: ./dist/lab$|src: ./${binary_name}|" \
|
||||
-e "s|src: ./dist/labctl$|src: ./${binary_name}|" \
|
||||
nfpm.yaml > "$tmpconfig"
|
||||
|
||||
nfpm pkg --config "$tmpconfig" --packager rpm --target dist/
|
||||
@@ -125,7 +125,7 @@ build_arch() {
|
||||
|
||||
local rpm_arch
|
||||
rpm_arch="$(rpm_arch_for "$arch")"
|
||||
RPM_FILE=$(ls dist/lab-*.${rpm_arch}.rpm 2>/dev/null | head -1)
|
||||
RPM_FILE=$(ls dist/labctl-*.${rpm_arch}.rpm 2>/dev/null | head -1)
|
||||
echo "==> Built: $RPM_FILE"
|
||||
echo " Size: $(du -h "$RPM_FILE" | cut -f1)"
|
||||
|
||||
@@ -136,13 +136,13 @@ build_arch() {
|
||||
|
||||
tmpconfig="$(mktemp /tmp/nfpm-XXXXXX.yaml)"
|
||||
sed -e "s|^arch:.*|arch: ${nfpm_arch}|" \
|
||||
-e "s|src: ./dist/lab$|src: ./${binary_name}|" \
|
||||
-e "s|src: ./dist/labctl$|src: ./${binary_name}|" \
|
||||
nfpm.yaml > "$tmpconfig"
|
||||
|
||||
nfpm pkg --config "$tmpconfig" --packager deb --target dist/
|
||||
rm -f "$tmpconfig"
|
||||
|
||||
DEB_FILE=$(ls dist/lab_*_${deb_arch}.deb 2>/dev/null | head -1)
|
||||
DEB_FILE=$(ls dist/labctl_*_${deb_arch}.deb 2>/dev/null | head -1)
|
||||
echo "==> Built: $DEB_FILE"
|
||||
echo " Size: $(du -h "$DEB_FILE" | cut -f1)"
|
||||
}
|
||||
@@ -162,7 +162,7 @@ echo "==> Generating shell completions..."
|
||||
pnpm completions:generate
|
||||
|
||||
mkdir -p dist
|
||||
rm -f dist/lab dist/lab-x86_64 dist/lab-arm64 dist/lab-*.rpm dist/lab*.deb
|
||||
rm -f dist/labctl dist/labctl-x86_64 dist/labctl-arm64 dist/labctl-*.rpm dist/labctl*.deb
|
||||
|
||||
if [ "$BUILD_ALL" = true ]; then
|
||||
build_arch "x86_64"
|
||||
@@ -177,4 +177,4 @@ fi
|
||||
|
||||
echo ""
|
||||
echo "==> Build complete. Artifacts in dist/:"
|
||||
ls -lh dist/lab* 2>/dev/null || echo " (none)"
|
||||
ls -lh dist/labctl* 2>/dev/null || echo " (none)"
|
||||
|
||||
Reference in New Issue
Block a user