Skip to content
This repository was archived by the owner on Aug 19, 2026. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
94 changes: 94 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
name: release-homecli

on:
workflow_dispatch:
inputs:
version:
description: "Release version (e.g., 0.4.25)"
required: true
type: string
branch:
description: "Release branch"
required: true
type: choice
default: release/v0.4
options:
- release/v0.4

jobs:
release:
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
permissions:
contents: write # to create tags and github releases

steps:
# weka/gohomecli is DEPRECATED. Releases of the Weka Home CLI are cut from
# https://github.com/weka/gohome. This guard fails any dispatch of this
# workflow from master; the release/v0.4 ref is deliberately left
# unguarded so an emergency hotfix can still be shipped from there.
- name: Repository is deprecated
run: |
echo "::error::weka/gohomecli is DEPRECATED - release from https://github.com/weka/gohome instead"
{
echo "## :warning: weka/gohomecli is deprecated"
echo ""
echo "The Weka Home CLI has moved to [weka/gohome](https://github.com/weka/gohome)."
echo "Cut this release from there instead:"
echo ""
echo '```'
echo 'git clone git@github.com:weka/gohome.git'
echo '```'
} >> "$GITHUB_STEP_SUMMARY"
exit 1

- name: Validate version format
env:
VERSION: ${{ github.event.inputs.version }}
run: |
if [[ ! "$VERSION" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
echo "::error::Version must be in format X.Y.Z (e.g., 0.4.25)"
exit 1
fi

- name: Checkout release branch
uses: actions/checkout@v4.1.1
with:
ref: ${{ github.event.inputs.branch }}
fetch-depth: 0

- name: Check if tag already exists
env:
VERSION: ${{ github.event.inputs.version }}
run: |
if git rev-parse "v$VERSION" >/dev/null 2>&1; then
echo "::error::Tag v$VERSION already exists. Please use a different version."
exit 1
fi
echo "Tag v$VERSION does not exist, proceeding with release."

- name: Setup Golang
uses: actions/setup-go@v5
with:
go-version-file: go.mod
cache-dependency-path: go.sum

- name: Build binaries
env:
VERSION: ${{ github.event.inputs.version }}
run: |
chmod +x ./build.sh
./build.sh "$VERSION"

- name: Create GitHub Release
uses: softprops/action-gh-release@4634c16e79c963813287e889244c50009e7f0981
with:
tag_name: "v${{ github.event.inputs.version }}"
name: "v${{ github.event.inputs.version }}"
target_commitish: ${{ github.event.inputs.branch }}
draft: false
generate_release_notes: true
files: |
bin/homecli_linux_amd64
bin/homecli_darwin_amd64
22 changes: 22 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
# ============================================================================
# weka/gohomecli is DEPRECATED. This Makefile intentionally refuses to run.
#
# The error function below fires during Make's read phase, so *every* target -
# build, test, clean, all - stops here. Do not remove this guard; move to the
# new repository instead.
# ============================================================================
$(info )
$(info ============================================================================)
$(info weka/gohomecli is DEPRECATED - it no longer builds.)
$(info )
$(info The Weka Home CLI has moved to: https://github.com/weka/gohome)
$(info )
$(info You are building from a stale clone. Get the new repository:)
$(info )
$(info $$ git clone git@github.com:weka/gohome.git)
$(info )
$(info If you have local work here, re-apply it against weka/gohome.)
$(info ============================================================================)
$(info )
$(error refusing to build a deprecated repository)

BUILD_PATH=$(CURDIR)
BIN_PATH=$(BUILD_PATH)/bin
PKG_PATH=$(BUILD_PATH)/pkg
Expand Down
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
> [!CAUTION]
> **This repository is deprecated and no longer builds.**
>
> The Weka Home CLI has moved to **[weka/gohome](https://github.com/weka/gohome)**.
> Every build entry point here (`make`, `./build.sh`, `./deploy.sh`, `go build`,
> the release workflow) fails on purpose so stale clones stop shipping from here.
>
> ```
> git clone git@github.com:weka/gohome.git
> ```
>
> If you have local work in this clone, re-apply it against `weka/gohome`.
> The documentation below is kept for historical reference only.

# Weka Home Command Line Utility


Expand Down
89 changes: 87 additions & 2 deletions build.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,92 @@
#!/usr/bin/env sh

# ============================================================================
# weka/gohomecli is DEPRECATED. This script intentionally refuses to run.
# Do not remove this guard; move your work to weka/gohome instead.
# ============================================================================
cat >&2 <<'DEPRECATED'

============================================================================
weka/gohomecli is DEPRECATED - it no longer builds.

The Weka Home CLI has moved to: https://github.com/weka/gohome

You are building from a stale clone. Get the new repository:

$ git clone git@github.com:weka/gohome.git

If you have local work here, re-apply it against weka/gohome.
============================================================================

DEPRECATED
echo "::error::weka/gohomecli is deprecated - build from https://github.com/weka/gohome instead" >&2
exit 1

set -e # Exit on any error

BUILD_VERSION=$1
BUILD_TIME=$(date +'%Y-%m-%d_%T')

echo "Building homecli version: ${BUILD_VERSION:-<no version specified>}"

LD_FLAGS="-X main.BuildVersion=$BUILD_VERSION -X main.BuildTime=$BUILD_TIME"
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="$LD_FLAGS" -o bin/homecli_linux_amd64 cmd/homecli/*.go
CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -ldflags="$LD_FLAGS" -o bin/homecli_darwin_amd64 cmd/homecli/*.go
LD_FLAGS="$LD_FLAGS -s -w"

echo "Building Linux amd64 binary..."
if ! CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="$LD_FLAGS" -o bin/homecli_linux_amd64 cmd/homecli/*.go; then
echo "::error::Failed to build Linux binary"
exit 1
fi

echo "Building macOS amd64 binary..."
if ! CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -ldflags="$LD_FLAGS" -o bin/homecli_darwin_amd64 cmd/homecli/*.go; then
echo "::error::Failed to build macOS binary"
exit 1
fi

# Add UPX compression (only on Linux, only for Linux binary)
# UPX doesn't support macOS binaries and the Linux UPX binary can't run on macOS

if [ "$(uname)" = "Linux" ]; then
echo "Compressing Linux binary with UPX..."
UPX_VERSION="${UPX_VERSION:-4.2.2}"
UPX_PLATFORM="${UPX_PLATFORM:-amd64_linux}"
# SHA256 checksum verified from official UPX 4.2.2 release
UPX_SHA256="915c8e844f835de03b9cc311ff185aedec79d757aee9d7133a528b9e89c463bb"

UPX_ARCHIVE="upx-${UPX_VERSION}-${UPX_PLATFORM}.tar.xz"

if [ ! -d "upx-${UPX_VERSION}-${UPX_PLATFORM}" ]; then
echo "Downloading UPX ${UPX_VERSION}..."
if ! wget -q "https://github.com/upx/upx/releases/download/v${UPX_VERSION}/${UPX_ARCHIVE}"; then
echo "::error::Failed to download UPX"
exit 1
fi

echo "Verifying UPX checksum..."
ACTUAL_SHA256=$(sha256sum "$UPX_ARCHIVE" | cut -d' ' -f1)
if [ "$ACTUAL_SHA256" != "$UPX_SHA256" ]; then
echo "::error::UPX checksum verification failed!"
echo "Expected: $UPX_SHA256"
echo "Actual: $ACTUAL_SHA256"
rm -f "$UPX_ARCHIVE"
exit 1
fi
echo "Checksum verified."

if ! tar xf "$UPX_ARCHIVE" "upx-${UPX_VERSION}-${UPX_PLATFORM}/upx"; then
echo "::error::Failed to extract UPX"
exit 1
fi
fi

if ! "upx-${UPX_VERSION}-${UPX_PLATFORM}/upx" bin/homecli_linux_amd64; then
echo "::error::Failed to compress Linux binary with UPX"
exit 1
fi
else
echo "Skipping UPX compression (not running on Linux)"
fi

echo ""
echo "Build completed successfully!"
13 changes: 13 additions & 0 deletions cmd/homecli/deprecated.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package main

// This repository is DEPRECATED. The Weka Home CLI has moved to weka/gohome:
//
// git clone git@github.com:weka/gohome.git
//
// The identifiers below are intentionally undefined so that any attempt to
// build this repository fails with the new location in the compiler output.
// Do not "fix" this file - move your work to weka/gohome instead.
const (
_ = THIS_REPOSITORY_IS_DEPRECATED_AND_NO_LONGER_BUILDS
_ = THE_WEKA_HOME_CLI_HAS_MOVED_TO_github_com_weka_gohome
)
21 changes: 21 additions & 0 deletions deploy.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,26 @@
#!/usr/bin/env bash

# ============================================================================
# weka/gohomecli is DEPRECATED. This script intentionally refuses to run.
# Do not remove this guard; move your work to weka/gohome instead.
# ============================================================================
cat >&2 <<'DEPRECATED'

============================================================================
weka/gohomecli is DEPRECATED - it no longer builds.

The Weka Home CLI has moved to: https://github.com/weka/gohome

You are building from a stale clone. Get the new repository:

$ git clone git@github.com:weka/gohome.git

If you have local work here, re-apply it against weka/gohome.
============================================================================

DEPRECATED
exit 1

set -e

. get_version.sh
Expand Down