From f464156917350999b3cd761f75a02db6ffe94096 Mon Sep 17 00:00:00 2001 From: 6543 <6543@obermui.de> Date: Thu, 20 Jul 2023 19:06:09 +0200 Subject: [PATCH] Enhance development on windows (#2022) - make sure git store files with LF on windows too - append .exe on windows as target for build targets too --- .gitattributes | 1 + Makefile | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) create mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 000000000..1cadeec36 --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +* test=auto eol=lf diff --git a/Makefile b/Makefile index 04a16d99e..8f4b0d819 100644 --- a/Makefile +++ b/Makefile @@ -172,13 +172,13 @@ build-ui: ## Build UI (cd web/; pnpm install --frozen-lockfile; pnpm build) build-server: build-ui generate-swagger ## Build server - CGO_ENABLED=${CGO_ENABLED} GOOS=${TARGETOS} GOARCH=${TARGETARCH} go build -ldflags '${LDFLAGS}' -o dist/woodpecker-server github.com/woodpecker-ci/woodpecker/cmd/server + CGO_ENABLED=${CGO_ENABLED} GOOS=${TARGETOS} GOARCH=${TARGETARCH} go build -ldflags '${LDFLAGS}' -o dist/woodpecker-server${BIN_SUFFIX} github.com/woodpecker-ci/woodpecker/cmd/server build-agent: ## Build agent - CGO_ENABLED=0 GOOS=${TARGETOS} GOARCH=${TARGETARCH} go build -ldflags '${LDFLAGS}' -o dist/woodpecker-agent github.com/woodpecker-ci/woodpecker/cmd/agent + CGO_ENABLED=0 GOOS=${TARGETOS} GOARCH=${TARGETARCH} go build -ldflags '${LDFLAGS}' -o dist/woodpecker-agent${BIN_SUFFIX} github.com/woodpecker-ci/woodpecker/cmd/agent build-cli: ## Build cli - CGO_ENABLED=0 GOOS=${TARGETOS} GOARCH=${TARGETARCH} go build -ldflags '${LDFLAGS}' -o dist/woodpecker-cli github.com/woodpecker-ci/woodpecker/cmd/cli + CGO_ENABLED=0 GOOS=${TARGETOS} GOARCH=${TARGETARCH} go build -ldflags '${LDFLAGS}' -o dist/woodpecker-cli${BIN_SUFFIX} github.com/woodpecker-ci/woodpecker/cmd/cli build: build-agent build-server build-cli ## Build all binaries