diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e660fd9 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +bin/ diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..291a29e --- /dev/null +++ b/Makefile @@ -0,0 +1,11 @@ +BINARY_NAME=thanks +VERSION=$(shell git describe --tags --always) +BUILD_TIME=$(shell date -u +%Y-%m-%dT%H:%M:%SZ) +LDFLAGS=-ldflags "-X main.Version=${VERSION} -X main.BuildTime=${BUILD_TIME}" + +.PHONY: all + +all: build-linux + +build-linux: + GOOS=linux GOARCH=amd64 go build ${LDFLAGS} -o bin/thanks ./cmd/thanks diff --git a/main.go b/cmd/thanks/main.go similarity index 100% rename from main.go rename to cmd/thanks/main.go diff --git a/internal/cmd/cmd.go b/internal/runner/runner.go similarity index 100% rename from internal/cmd/cmd.go rename to internal/runner/runner.go diff --git a/internal/cmd/cmd_test.go b/internal/runner/runner_test.go similarity index 100% rename from internal/cmd/cmd_test.go rename to internal/runner/runner_test.go diff --git a/internal/zfs/zfs_test.go b/internal/zfs/zfs_test.go index 7d646f9..ddaa201 100644 --- a/internal/zfs/zfs_test.go +++ b/internal/zfs/zfs_test.go @@ -1,4 +1,4 @@ -package main_test +package zfs_test import ( "fmt"