From 183d7b966bfdedcb909ff2fb0888985f140f35a8 Mon Sep 17 00:00:00 2001 From: mexcool Date: Fri, 27 Mar 2026 11:11:29 +0100 Subject: [PATCH] feat: ship both sl and simplelogin binaries to avoid name conflicts --- .goreleaser.yaml | 19 +++++++++++++++++++ Makefile | 2 ++ README.md | 4 +++- 3 files changed, 24 insertions(+), 1 deletion(-) diff --git a/.goreleaser.yaml b/.goreleaser.yaml index c76218a..182df8e 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -24,6 +24,23 @@ builds: - -trimpath ldflags: - -s -w -X main.version={{ .Version }} -X main.commit={{ .ShortCommit }} -X main.date={{ .Date }} + - id: simplelogin + main: ./cmd/sl + binary: simplelogin + env: + - CGO_ENABLED=0 + goos: + - linux + - darwin + - windows + goarch: + - amd64 + - arm64 + mod_timestamp: "{{ .CommitTimestamp }}" + flags: + - -trimpath + ldflags: + - -s -w -X main.version={{ .Version }} -X main.commit={{ .ShortCommit }} -X main.date={{ .Date }} archives: - id: default @@ -73,5 +90,7 @@ brews: license: "MIT" install: | bin.install "sl" + bin.install "simplelogin" test: | system "#{bin}/sl", "--version" + system "#{bin}/simplelogin", "--version" diff --git a/Makefile b/Makefile index 4df660a..edbc187 100644 --- a/Makefile +++ b/Makefile @@ -9,11 +9,13 @@ LDFLAGS := -s -w \ build: go build -ldflags="$(LDFLAGS)" -o bin/sl ./cmd/sl + cp bin/sl bin/simplelogin PREFIX ?= /usr/local install: build install -d $(DESTDIR)$(PREFIX)/bin install -m 755 bin/sl $(DESTDIR)$(PREFIX)/bin/sl + install -m 755 bin/simplelogin $(DESTDIR)$(PREFIX)/bin/simplelogin test: go test ./... diff --git a/README.md b/README.md index 35546de..87d61ce 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,9 @@ go install github.com/mexcool/simplelogin-cli/cmd/sl@latest ### GitHub Releases -Download pre-built binaries for your platform from the [Releases](https://github.com/mexcool/simplelogin-cli/releases) page. +Download pre-built binaries for your platform from the [Releases](https://github.com/mexcool/simplelogin-cli/releases) page. Each release includes both `sl` and `simplelogin` binaries. + +> **Note:** The primary command is `sl`. If that conflicts with another tool (e.g., the [steam locomotive](https://github.com/mtoyoda/sl)), use `simplelogin` instead — it's the same binary under a different name. All examples in this README use `sl` but `simplelogin` works identically. ### From source