- Set up Go module with Cobra CLI skeleton - Implemented login/logout/session commands with 2FA support - Created ProtonMail API client with rate limiting - Added config management for ~/.config/pop/ - Configured CI/CD pipeline with GitHub Actions - Added Makefile for build/test/lint targets Files: - main.go, go.mod, go.sum - cmd/root.go, cmd/auth.go - internal/auth/session.go - internal/config/config.go - internal/api/client.go - Makefile, README.md, .gitignore - .github/workflows/ci.yml
34 lines
406 B
Makefile
34 lines
406 B
Makefile
.PHONY: build test clean fmt lint run
|
|
|
|
BINARY_NAME := pop
|
|
GO := go
|
|
GOFLAGS := -v
|
|
|
|
all: build
|
|
|
|
build:
|
|
$(GO) build $(GOFLAGS) -o $(BINARY_NAME) ./main.go
|
|
|
|
test:
|
|
$(GO) test -v ./...
|
|
|
|
clean:
|
|
rm -f $(BINARY_NAME)
|
|
$(GO) clean
|
|
|
|
fmt:
|
|
$(GO) fmt ./...
|
|
|
|
lint:
|
|
$(GO) vet ./...
|
|
|
|
run: build
|
|
./$(BINARY_NAME)
|
|
|
|
deps:
|
|
$(GO) mod download
|
|
$(GO) mod tidy
|
|
|
|
install: build
|
|
install -m 755 $(BINARY_NAME) $(GOPATH)/bin/
|