Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
# yaml-language-server: $schema=https://goreleaser.com/static/schema.json
version: 2

project_name: tfc
project_name: tfccli

before:
hooks:
- go mod tidy

builds:
- id: tfc
- id: tfccli
main: ./cmd/tfc
binary: tfc
binary: tfccli
env:
- CGO_ENABLED=0
goos:
Expand Down
4 changes: 2 additions & 2 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ CLI for interacting with the Terraform Cloud APIs. Built with Go and Kong for co
## Commands

```bash
make # Build binary to bin/tfc
make # Build binary to bin/tfccli
make test # Run all tests
make lint # Run golangci-lint
make fmt # Format code (goimports + gofumpt)
make ci # fmt-check + lint + test (CI pipeline)
make tools # Install dev tools to .tools/
make tfc ARGS="version" # Build and run with args
make tfccli ARGS="version" # Build and run with args

go test ./internal/config/... # Run tests for specific package
go test -run TestName ./... # Run single test by name
Expand Down
12 changes: 6 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ SHELL := /bin/bash
# `make` should build the binary by default.
.DEFAULT_GOAL := build

.PHONY: build tfc tfc-help help fmt fmt-check lint test ci tools clean install all
.PHONY: build tfccli tfccli-help help fmt fmt-check lint test ci tools clean install all

BIN_DIR := $(CURDIR)/bin
BIN := $(BIN_DIR)/tfc
BIN := $(BIN_DIR)/tfccli
CMD := ./cmd/tfc

VERSION := $(shell git describe --tags --always --dirty 2>/dev/null || echo dev)
Expand All @@ -23,17 +23,17 @@ build:
@mkdir -p $(BIN_DIR)
@go build -ldflags "$(LDFLAGS)" -o $(BIN) $(CMD)

tfc: build
tfccli: build
@if [ -z "$(ARGS)" ]; then \
$(BIN) --help; \
else \
$(BIN) $(ARGS); \
fi

tfc-help: build
tfccli-help: build
@$(BIN) --help

help: tfc-help
help: tfccli-help

tools:
@mkdir -p $(TOOLS_DIR)
Expand All @@ -59,7 +59,7 @@ test:
ci: fmt-check lint test

clean:
rm -f tfc
rm -f tfccli
rm -rf bin/
rm -rf dist/
rm -rf .tools/
Expand Down
Loading