Skip to content

Commit 2bba18c

Browse files
committed
fix: rename module path to lu-zhengda, add shell completions
- Rename Go module from github.com/zhengda-lu to github.com/lu-zhengda - Add hidden --generate-completion flag for bash/zsh/fish completions - Update goreleaser to archive and distribute completions via Homebrew - Add completion generation step to release workflow
1 parent 4bed0bf commit 2bba18c

19 files changed

Lines changed: 61 additions & 30 deletions

File tree

.github/workflows/release.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,13 @@ jobs:
2323
- name: Run tests
2424
run: go test -race ./...
2525

26+
- name: Generate completions
27+
run: |
28+
mkdir -p completions
29+
go run ./cmd/lanchr --generate-completion bash > completions/lanchr.bash
30+
go run ./cmd/lanchr --generate-completion zsh > completions/lanchr.zsh
31+
go run ./cmd/lanchr --generate-completion fish > completions/lanchr.fish
32+
2633
- uses: goreleaser/goreleaser-action@v6
2734
with:
2835
version: "~> v2"

.goreleaser.yaml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,14 @@ builds:
1010
- arm64
1111
ldflags:
1212
- -s -w
13-
- -X github.com/zhengda-lu/lanchr/internal/cli.version={{.Version}}
13+
- -X github.com/lu-zhengda/lanchr/internal/cli.version={{.Version}}
1414

1515
archives:
1616
- formats:
1717
- tar.gz
1818
name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
19+
files:
20+
- completions/*
1921

2022
checksum:
2123
name_template: "checksums.txt"
@@ -39,6 +41,10 @@ homebrew_casks:
3941
license: "MIT"
4042
binaries:
4143
- lanchr
44+
completions:
45+
bash: completions/lanchr.bash
46+
zsh: completions/lanchr.zsh
47+
fish: completions/lanchr.fish
4248
hooks:
4349
post:
4450
install: |

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ BUILD_DIR := ./bin
55
PREFIX ?= /usr/local
66
VERSION ?= $(shell git describe --tags --always --dirty 2>/dev/null || echo dev)
77
LDFLAGS := -s -w \
8-
-X github.com/zhengda-lu/lanchr/internal/cli.version=$(VERSION)
8+
-X github.com/lu-zhengda/lanchr/internal/cli.version=$(VERSION)
99

1010
build:
1111
go build -ldflags "$(LDFLAGS)" -o $(BUILD_DIR)/$(BINARY) ./cmd/lanchr

cmd/lanchr/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66
"fmt"
77
"os"
88

9-
"github.com/zhengda-lu/lanchr/internal/cli"
9+
"github.com/lu-zhengda/lanchr/internal/cli"
1010
)
1111

1212
func main() {

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
module github.com/zhengda-lu/lanchr
1+
module github.com/lu-zhengda/lanchr
22

33
go 1.25.0
44

internal/agent/manager.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ package agent
33
import (
44
"fmt"
55

6-
"github.com/zhengda-lu/lanchr/internal/launchctl"
7-
"github.com/zhengda-lu/lanchr/internal/platform"
8-
"github.com/zhengda-lu/lanchr/internal/plist"
6+
"github.com/lu-zhengda/lanchr/internal/launchctl"
7+
"github.com/lu-zhengda/lanchr/internal/platform"
8+
"github.com/lu-zhengda/lanchr/internal/plist"
99
)
1010

1111
// Manager performs lifecycle operations on services.

internal/agent/scanner.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ import (
88
"strings"
99
"sync"
1010

11-
"github.com/zhengda-lu/lanchr/internal/launchctl"
12-
"github.com/zhengda-lu/lanchr/internal/platform"
13-
"github.com/zhengda-lu/lanchr/internal/plist"
11+
"github.com/lu-zhengda/lanchr/internal/launchctl"
12+
"github.com/lu-zhengda/lanchr/internal/platform"
13+
"github.com/lu-zhengda/lanchr/internal/plist"
1414
)
1515

1616
// Scanner discovers all launch agents and daemons across all domains

internal/agent/service.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package agent
33
import (
44
"strings"
55

6-
"github.com/zhengda-lu/lanchr/internal/platform"
6+
"github.com/lu-zhengda/lanchr/internal/platform"
77
)
88

99
// Status represents the runtime state of a service.

internal/cli/create.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import (
77
"strings"
88

99
"github.com/spf13/cobra"
10-
"github.com/zhengda-lu/lanchr/internal/plist"
10+
"github.com/lu-zhengda/lanchr/internal/plist"
1111
)
1212

1313
var (

internal/cli/doctor.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import (
44
"fmt"
55

66
"github.com/spf13/cobra"
7-
"github.com/zhengda-lu/lanchr/internal/agent"
7+
"github.com/lu-zhengda/lanchr/internal/agent"
88
)
99

1010
var doctorCmd = &cobra.Command{

0 commit comments

Comments
 (0)