From ef83e73a43d9b696206ee7f2f4ccdd322656c40e Mon Sep 17 00:00:00 2001 From: Timo Behrendt Date: Mon, 23 Dec 2024 19:35:16 +0100 Subject: [PATCH] g --- .gitea/workflows/ci.yaml | 4 +++- Makefile | 15 +++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/ci.yaml b/.gitea/workflows/ci.yaml index dac1a20..bb32539 100644 --- a/.gitea/workflows/ci.yaml +++ b/.gitea/workflows/ci.yaml @@ -35,8 +35,10 @@ jobs: /go_cache key: go_path-${{ steps.hash-go.outputs.hash }} restore-keys: |- - go_cache-${{ steps.hash-go.outputs.hash }} + go_cache-${{ steps.hash-go.outputs.hash }} - name: build run: make build - name: test run: make test + - name: check:format + run: make check-format diff --git a/Makefile b/Makefile index 142723b..07246c5 100644 --- a/Makefile +++ b/Makefile @@ -6,3 +6,18 @@ build: lint: golint ./... + +run: + make build + ./realdyndns + +format: + gofmt -w . + +check-format: + @OUTPUT=$$(gofmt -l .); \ + if [ -n "$$OUTPUT" ]; then \ + echo "Formatter failed for:"; \ + echo "$$OUTPUT"; \ + exit 1; \ + fi