mirror of
https://github.com/grdl/git-get.git
synced 2026-02-04 15:04:44 +00:00
Rename master to main, add makefile for running common commands
This commit is contained in:
4
.github/workflows/ci.yml
vendored
4
.github/workflows/ci.yml
vendored
@@ -2,9 +2,9 @@ name: CI
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [master, main]
|
branches: [main]
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [master, main]
|
branches: [main]
|
||||||
workflow_call:
|
workflow_call:
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
|
|||||||
40
Makefile
Normal file
40
Makefile
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
.PHONY: build test fmt lint clean all help
|
||||||
|
|
||||||
|
# Default target
|
||||||
|
all: fmt lint build test
|
||||||
|
|
||||||
|
# Build the binary
|
||||||
|
build:
|
||||||
|
@echo "Building git-get..."
|
||||||
|
go build -o git-get ./cmd/
|
||||||
|
|
||||||
|
# Run tests with race detection
|
||||||
|
test:
|
||||||
|
@echo "Running tests..."
|
||||||
|
go test -race ./...
|
||||||
|
|
||||||
|
# Format code
|
||||||
|
fmt:
|
||||||
|
@echo "Formatting code..."
|
||||||
|
go fmt ./...
|
||||||
|
|
||||||
|
# Run linter with auto-fix
|
||||||
|
lint:
|
||||||
|
@echo "Running linter..."
|
||||||
|
golangci-lint run --fix
|
||||||
|
|
||||||
|
# Clean built binaries
|
||||||
|
clean:
|
||||||
|
@echo "Cleaning..."
|
||||||
|
rm -f git-get
|
||||||
|
|
||||||
|
# Show help
|
||||||
|
help:
|
||||||
|
@echo "Available targets:"
|
||||||
|
@echo " build - Build the git-get binary"
|
||||||
|
@echo " test - Run tests with race detection"
|
||||||
|
@echo " fmt - Format Go code"
|
||||||
|
@echo " lint - Run golangci-lint with auto-fix"
|
||||||
|
@echo " clean - Remove built binaries"
|
||||||
|
@echo " all - Run fmt, lint, build, and test (default)"
|
||||||
|
@echo " help - Show this help message"
|
||||||
@@ -3,7 +3,7 @@
|
|||||||
[](https://github.com/grdl/git-get/actions)
|
[](https://github.com/grdl/git-get/actions)
|
||||||
[](https://goreportcard.com/report/github.com/grdl/git-get)
|
[](https://goreportcard.com/report/github.com/grdl/git-get)
|
||||||
[](https://github.com/grdl/git-get/releases/latest)
|
[](https://github.com/grdl/git-get/releases/latest)
|
||||||
[](https://github.com/grdl/git-get/blob/master/go.mod)
|
[](https://github.com/grdl/git-get/blob/main/go.mod)
|
||||||
[](LICENSE.md)
|
[](LICENSE.md)
|
||||||
|
|
||||||
A tool to clone, organize, and manage multiple Git repositories with an automatic directory structure based on repository URLs.
|
A tool to clone, organize, and manage multiple Git repositories with an automatic directory structure based on repository URLs.
|
||||||
|
|||||||
Reference in New Issue
Block a user