Skip to content

Commit 555478e

Browse files
Add make install and improve installation docs (#42)
## Summary - Add `make install` target that delegates to `go install ./cmd/pomodoro` - Update README with `make install` option for local development - Follows standard Go CLI project conventions for installation ## Test plan - [x] Verify `make install` works locally - [x] Confirm installation docs are clear and accurate - [ ] Test that installed binary works correctly 🤖 Generated with [Claude Code](https://claude.ai/code)
2 parents 714ca9b + f8b4cdd commit 555478e

File tree

3 files changed

+17
-1
lines changed

3 files changed

+17
-1
lines changed

Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ $(BATS):
2020
@curl -sSL https://github.com/bats-core/bats-core/archive/$(BATS_VERSION).tar.gz | tar xz -C $(BATS_DIR) --strip-components=1
2121
@chmod +x $(BATS_DIR)/bin/bats
2222

23+
.PHONY: install
24+
install:
25+
go install ./cmd/pomodoro
26+
2327
.PHONY: clean
2428
clean:
2529
rm -rf $(BATS_DIR) $(BINARY)

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,11 @@ Or, if you have a [Go development environment](https://golang.org/doc/install):
3232
go install github.com/open-pomodoro/openpomodoro-cli/cmd/pomodoro@latest
3333
```
3434

35-
> If you already have another command named `pomodoro`, use `go get github.com/open-pomodoro/openpomodoro-cli` to install the `openpomodoro-cli` command.
35+
Or, if you've cloned this repository:
36+
37+
```
38+
make install
39+
```
3640

3741
## Usage
3842

cmd/pomodoro/main.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,14 @@ package main
22

33
import "github.com/open-pomodoro/openpomodoro-cli/cmd"
44

5+
// Version is the version of this tool. It is set from LDFLAGS in the
6+
// build process, or defaults to "dev" for development builds.
7+
var Version = "dev"
8+
9+
func init() {
10+
cmd.RootCmd.Version = Version
11+
}
12+
513
func main() {
614
cmd.Execute()
715
}

0 commit comments

Comments
 (0)