Skip to content

Commit

Permalink
.build/go.mk: create windows binaries with .exe extension (#792)
Browse files Browse the repository at this point in the history
Signed-off-by: Mario Salgado <[email protected]>
Signed-off-by: zalgonoise <[email protected]>
  • Loading branch information
zalgonoise authored Aug 13, 2024
1 parent 4a8ab44 commit 98c9fb9
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions .build/go.mk
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,12 @@ mk_go_build_clean:

$(CROSS_COMPILED_BINARIES): $(GOFILES) $(TARGET_DIST)
$(info *** compiling $@)
@GOOS=$(call get_os_from_binary_file,$@) \
@os=$(call get_os_from_binary_file,$@); \
filename=$@ ; \
if [[ $${os} == 'windows' ]]; then filename=$@.exe; fi; \
GOOS=$${os} \
GOARCH=$(call get_arch_from_binary_file,$@) \
$(GO_BUILD) $(BUILD_MODE) $(LDFLAGS) -o $@;
$(GO_BUILD) $(BUILD_MODE) $(LDFLAGS) -o $${filename};

##### =====> Compile Tests <===== #####

Expand Down

0 comments on commit 98c9fb9

Please sign in to comment.