Skip to content

Commit

Permalink
fixing windows makefile issues
Browse files Browse the repository at this point in the history
Main is that the golang linter will not be able to run, this is due to
Powershell's choice of diff tool.
See golangci/golangci-lint#3408 (comment)
for more info.
  • Loading branch information
TimetoPretend54 committed May 23, 2023
1 parent 0d6d9ad commit 899c13d
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@ LINT = github.com/golangci/golangci-lint/cmd/golangci-lint@${LINT_VERSION}
# must be first
default: clean dep build lint

windows: clean dep build-windows

# clean - removes object files from package src directories
clean:
go clean
rm -rf ./${OUT_DIR}
-rm -rf ./${OUT_DIR}

# install dependencies
dep:
Expand All @@ -23,6 +25,11 @@ build: clean
GOARCH=amd64 GOOS=windows go build -tags="" -o ${OUT_DIR}/windows/ ./...
GOARCH=amd64 GOOS=linux go build -tags="" -o ${OUT_DIR}/linux/ ./...

build-windows: clean
set GOARCH=amd64 set GOOS=darwin go build -tags="" -o ${OUT_DIR}/darwin/ ./...
set GOARCH=amd64 set GOOS=windows go build -tags="" -o ${OUT_DIR}/windows/ ./...
set GOARCH=amd64 set GOOS=linux go build -tags="" -o ${OUT_DIR}/linux/ ./...

# run project
run:
go run ./...
Expand Down

0 comments on commit 899c13d

Please sign in to comment.