Fix Makefile for Windows builds #566
Labels
No Label
kind/breaking
kind/bug
kind/build
kind/dependency
kind/deployment
kind/docs
kind
enhancement
kind
feature
kind/proposal
kind
question
kind
refactor
kind/security
kind/testing
kind/translation
priority/critical
priority/high
priority/low
priority/medium
reviewed/duplicate
reviewed/invalid
reviewed/wontfix
skip-changelog
status/blocked
status/has-backport
status/has-pull
status/needs-backport
status/needs-feedback
status/needs-reviews
status/wip
upstream/gitea
upstream/sdk
No Milestone
No Assignees
3 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: gitea/tea#566
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "RivenSkaye/tea-cli:main"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fixes #564 (/gitea/tea/issues/564) by applying minor changes to the Makefile.
BINEXT
variable which holds a file name extension (.exe for Windows, empty otherwise)$(EXECUTABLE)
withtea$(EXECUTABLE)
$(BINEXT)
to the custom vet tool flagBesides that I made two minor changes
[.exe]
to the ignore rule for gitea-vet, so it also ignores the binary when built on Windows hosts$(DIST)/binaries
from release-dirs as this is not being called anywhere elseI've tested almost all
make
tasks to work on Windows. The only one I haven't run is the docker build.WIP tag is because I still have to test it on Linux, will do so in a bit. I also asked for some discussion on the original issue, which I'd like to do before blindly asking to merge in changes
$(DIST)/binaries
dir e95b14b7bbAll tests run fine on Linux as well, so it's pretty much good to go if the solution is well-received.
There are, however, two things to note.
GOPATH/bin
to my system path (clean system install). I didn't notice on Windows because I already had it in my PATH there, but under the umbrella of environment compatibility I'd like to also edit the revive and misspell lines to prefix them with$(shell $(GO) env GOPATH)/bin/
.I wonder if it would be better to do something similar for the vet tool rather than deal with
BINEXT
.I'm on the fence, so either seems fine to me.
For signing off, I'm not too concerned since you've signed the commits and have indicated here as an ack.
For this I think a
go run
directive would be more useful to directly run them, but it doesn't need to be included in this PR. 🙂I thought about this as well before opening the issue (I made sure it actually worked with correct filenames first), but if more files get added to the
make
tasks, it'd also require more variables which is why I went with this. But I'll gladly leave the final decision to maintainers and opt out of blame 😉Gotcha, I'll do a quick search for other issues and open one if there aren't any once I'm home. I'll also make the requested changes then
WIP: Fix Makefile for Windows buildsto Fix Makefile for Windows buildsDidn't make it last night, something came up. CI run passed, so if there's anything else missing I'd gladly fix before approval