-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
8 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,32 @@ | ||
.PHONY: all build clean test lint ci | ||
.PHONY: all build clean test lint lint-check ci | ||
|
||
|
||
# Binary name for the output binary | ||
BINARY_NAME=fork-sweeper | ||
|
||
# Default command to run when no arguments are provided to make | ||
all: build | ||
|
||
# Builds the binary | ||
build: | ||
@echo "Building..." | ||
go build -C cmd/fork-sweeper -o ../../${BINARY_NAME} | ||
|
||
# Cleans our project: deletes binaries | ||
clean: | ||
@echo "Cleaning..." | ||
go clean | ||
rm -f ${BINARY_NAME} | ||
|
||
# Runs tests | ||
test: | ||
@echo "Running tests..." | ||
go test ./... -cover | ||
|
||
# Lints the project | ||
lint: | ||
@echo "Linting..." | ||
go fmt ./... | ||
go vet ./... | ||
go mod tidy | ||
|
||
# Command for Continuous Integration | ||
ci: lint test | ||
@echo "CI steps..." | ||
# Add commands specific to your CI setup | ||
# e.g., integration testing, deployment commands, etc. | ||
|
||
# Additional commands can be added below for database migrations, Docker operations, etc. | ||
lint-check: | ||
@echo "Checking lint..." | ||
@if [ -n "$$(gofmt -l .)" ]; then \ | ||
echo "Some files are not formatted. Please run 'gofmt -w .' on your code."; \ | ||
exit 1; \ | ||
fi |