Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorporate multi-binary build support in check-mail Makefile to other projects #14

Open
atc0005 opened this issue May 2, 2020 · 0 comments
Assignees
Labels
builds enhancement New feature or request golang

Comments

@atc0005
Copy link
Owner

atc0005 commented May 2, 2020

Sample snippets from that Makefile:

# Space-separated list of cmd/BINARY_NAME directories to build
WHAT 					= check_imap_mailbox
.PHONY: linux
## linux: generates assets for Linux distros
linux:
	@echo "Building release assets for linux ..."

	@for target in $(WHAT); do \
		mkdir -p $(OUTPUTDIR)/$$target && \
		echo "Building 386 binaries" && \
		env GOOS=linux GOARCH=386 $(BUILDCMD) -o $(OUTPUTDIR)/$$target/$$target-$(VERSION)-linux-386 ${PWD}/cmd/$$target && \
		echo "Building amd64 binaries" && \
		env GOOS=linux GOARCH=amd64 $(BUILDCMD) -o $(OUTPUTDIR)/$$target/$$target-$(VERSION)-linux-amd64 ${PWD}/cmd/$$target && \
		echo "Generating checksum files" && \
		$(CHECKSUMCMD) $(OUTPUTDIR)/$$target/$$target-$(VERSION)-linux-386 > $(OUTPUTDIR)/$$target/$$target-$(VERSION)-linux-386.sha256 && \
		$(CHECKSUMCMD) $(OUTPUTDIR)/$$target/$$target-$(VERSION)-linux-amd64 > $(OUTPUTDIR)/$$target/$$target-$(VERSION)-linux-amd64.sha256; \
	done

	@echo "Completed build tasks for linux"

Direct link:

@atc0005 atc0005 added enhancement New feature or request golang builds labels May 2, 2020
@atc0005 atc0005 self-assigned this May 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
builds enhancement New feature or request golang
Projects
None yet
Development

No branches or pull requests

1 participant