Skip to content

Commit c47e82d

Browse files
committed
fix: fix ci and lint
1 parent eb1b780 commit c47e82d

7 files changed

Lines changed: 14 additions & 46 deletions

File tree

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
strategy:
1717
fail-fast: false
1818
matrix:
19-
os: [ubuntu-latest, macos-latest, windows-latest]
19+
os: [ubuntu-latest, macos-latest]
2020

2121
steps:
2222
- uses: actions/checkout@v4

.github/workflows/release.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,5 +36,4 @@ jobs:
3636
# Optional — set to publish to each distribution channel.
3737
# If a secret is absent the channel is skipped automatically.
3838
HOMEBREW_TAP_TOKEN: ${{ secrets.HOMEBREW_TAP_TOKEN || '' }}
39-
SCOOP_BUCKET_TOKEN: ${{ secrets.SCOOP_BUCKET_TOKEN || '' }}
4039
AUR_KEY: ${{ secrets.AUR_KEY || '' }}

.goreleaser.yaml

Lines changed: 2 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -21,18 +21,13 @@ builds:
2121
goos:
2222
- linux
2323
- darwin
24-
- windows
2524
goarch:
2625
- amd64
2726
- arm64
2827
- arm # linux/arm (armv7 — Raspberry Pi, embedded)
2928
goarm:
3029
- "7"
3130
ignore:
32-
- goos: windows
33-
goarch: arm64
34-
- goos: windows
35-
goarch: arm
3631
- goos: darwin
3732
goarch: arm
3833

@@ -46,9 +41,6 @@ archives:
4641
{{- else if eq .Arch "arm64" }}arm64
4742
{{- else if eq .Arch "arm" }}armv7
4843
{{- else }}{{ .Arch }}{{ end }}
49-
format_overrides:
50-
- goos: windows
51-
format: zip
5244
files:
5345
- LICENSE
5446
- README.md
@@ -82,6 +74,8 @@ changelog:
8274
order: 999
8375

8476
# ── macOS / Linux: Homebrew ────────────────────────────────────────────────
77+
# Binaries are uploaded to GitHub Releases; GoReleaser pushes the formula to
78+
# the tap repo so `brew install hapiio/tap/git-profile` resolves correctly.
8579
brews:
8680
- repository:
8781
owner: hapiio
@@ -104,23 +98,6 @@ brews:
10498
zsh_completion.install Utils.safe_popen_read(bin/"git-profile", "completion", "zsh") => "_git-profile"
10599
fish_completion.install Utils.safe_popen_read(bin/"git-profile", "completion", "fish") => "git-profile.fish"
106100
107-
# ── Windows: Scoop ────────────────────────────────────────────────────────
108-
# Skipped automatically when SCOOP_BUCKET_TOKEN secret is not configured.
109-
scoops:
110-
- repository:
111-
owner: hapiio
112-
name: scoop-bucket
113-
token: "{{ .Env.SCOOP_BUCKET_TOKEN }}"
114-
commit_author:
115-
name: goreleaserbot
116-
email: bot@goreleaser.com
117-
commit_message_template: "Scoop update for {{ .ProjectName }} version {{ .Tag }}"
118-
directory: bucket
119-
homepage: "https://github.com/hapiio/git-profile"
120-
description: "Manage multiple git identity profiles with a single command"
121-
license: MIT
122-
skip_upload: "{{ if not .Env.SCOOP_BUCKET_TOKEN }}true{{ end }}"
123-
124101
# ── Arch Linux: AUR ──────────────────────────────────────────────────────
125102
aurs:
126103
- name: git-profile-bin

CONTRIBUTING.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -221,13 +221,12 @@ This triggers `.github/workflows/release.yml`, which:
221221

222222
1. Runs the full test suite
223223
2. Builds binaries for all platforms (linux/amd64, linux/arm64, linux/armv7,
224-
darwin/amd64, darwin/arm64, windows/amd64)
224+
darwin/amd64, darwin/arm64)
225225
3. Creates GitHub Release with checksums
226-
4. Publishes archives (`.tar.gz` / `.zip`)
226+
4. Publishes archives (`.tar.gz`)
227227
5. Publishes `.deb` and `.rpm` packages
228228
6. Updates the Homebrew formula (macOS + Linux)
229-
7. Updates the Scoop bucket (Windows) — if `SCOOP_BUCKET_TOKEN` is set
230-
8. Publishes to AUR (Arch Linux) — if `AUR_KEY` is set
229+
7. Publishes to AUR (Arch Linux) — if `AUR_KEY` is set
231230

232231
---
233232

@@ -238,7 +237,6 @@ Add these under **Settings → Secrets and variables → Actions**:
238237
| Secret | Required | Description |
239238
|---|---|---|
240239
| `HOMEBREW_TAP_TOKEN` | Recommended | PAT with `repo` write access to `hapiio/homebrew-tap` |
241-
| `SCOOP_BUCKET_TOKEN` | Optional | PAT with `repo` write access to `hapiio/scoop-bucket` |
242240
| `AUR_KEY` | Optional | Base64-encoded ed25519 private key registered on AUR |
243241
| `CODECOV_TOKEN` | Optional | Codecov upload token for coverage reporting |
244242

README.md

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ never accidentally push a personal commit with your work email again.
2424
- **Interactive picker** — fuzzy-free numbered menu when you can't remember the ID
2525
- **Import existing identity** — bootstrap a profile from your current git config in one command
2626
- **Edit, rename, remove** — full profile lifecycle management
27-
- **Shell completions** — bash, zsh, fish, and PowerShell
27+
- **Shell completions** — bash, zsh, and fish
2828
- **Zero runtime dependencies** — single static binary, no runtime required
2929

3030
---
@@ -173,10 +173,7 @@ Resolution order:
173173

174174
Profiles are stored in a JSON file at:
175175

176-
| Platform | Path |
177-
| ------------- | -------------------------------------------------------------------------------------------- |
178-
| macOS / Linux | `$XDG_CONFIG_HOME/git-profile/config.json` (defaults to `~/.config/git-profile/config.json`) |
179-
| Windows | `%AppData%\git-profile\config.json` |
176+
Profiles are stored at `$XDG_CONFIG_HOME/git-profile/config.json` (defaults to `~/.config/git-profile/config.json`).
180177

181178
Override the path with `--config`:
182179

@@ -220,9 +217,6 @@ git-profile completion zsh > "${fpath[1]}/_git-profile"
220217

221218
# fish
222219
git-profile completion fish > ~/.config/fish/completions/git-profile.fish
223-
224-
# PowerShell
225-
git-profile completion powershell | Out-String | Invoke-Expression
226220
```
227221

228222
---

internal/config/config.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ func (m *Manager) Load() (*Config, error) {
9292
}
9393
return nil, fmt.Errorf("opening config: %w", err)
9494
}
95-
defer f.Close()
95+
defer f.Close() //nolint:errcheck // read-only file; close error is inconsequential
9696

9797
if err := json.NewDecoder(f).Decode(cfg); err != nil {
9898
return nil, fmt.Errorf("parsing config %s: %w", m.path, err)
@@ -118,18 +118,18 @@ func (m *Manager) Save(cfg *Config) error {
118118
enc := json.NewEncoder(f)
119119
enc.SetIndent("", " ")
120120
if encErr := enc.Encode(cfg); encErr != nil {
121-
f.Close()
122-
os.Remove(tmp)
121+
f.Close() //nolint:errcheck // already handling encode error
122+
os.Remove(tmp) //nolint:errcheck // best-effort cleanup
123123
return fmt.Errorf("encoding config: %w", encErr)
124124
}
125125

126126
if err := f.Close(); err != nil {
127-
os.Remove(tmp)
127+
os.Remove(tmp) //nolint:errcheck // best-effort cleanup
128128
return fmt.Errorf("flushing config: %w", err)
129129
}
130130

131131
if err := os.Rename(tmp, m.path); err != nil {
132-
os.Remove(tmp)
132+
os.Remove(tmp) //nolint:errcheck // best-effort cleanup
133133
return fmt.Errorf("saving config: %w", err)
134134
}
135135

internal/ui/ui.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ var (
2828
Bold = lipgloss.NewStyle().Bold(true)
2929

3030
// ActiveMarker is the bullet shown next to the current profile.
31-
ActiveMarker = Success.Copy().Bold(true).Render("●")
31+
ActiveMarker = lipgloss.NewStyle().Foreground(colorSuccess).Bold(true).Render("●")
3232
)
3333

3434
// Successf prints a styled success message to stdout.

0 commit comments

Comments
 (0)