@@ -208,6 +208,7 @@ goclean:
208
208
@mkdir -p " $( ASSETS_PATH) "
209
209
@rm -vf $(wildcard $(ASSETS_PATH ) /* /* -linux-* )
210
210
@rm -vf $(wildcard $(ASSETS_PATH ) /* /* -windows-* )
211
+ @rm -vf $(wildcard $(ASSETS_PATH ) /* /* -darwin-* )
211
212
@rm -vf $(wildcard $(ASSETS_PATH ) /packages/* /* .rpm)
212
213
@rm -vf $(wildcard $(ASSETS_PATH ) /packages/* /* .rpm.sha256)
213
214
@rm -vf $(wildcard $(ASSETS_PATH ) /packages/* /* .deb)
@@ -266,8 +267,8 @@ depsinstall:
266
267
267
268
.PHONY : all
268
269
# https://stackoverflow.com/questions/3267145/makefile-execute-another-target
269
- # # all: generates assets for Linux distros and Windows
270
- all : clean windows linux
270
+ # # all: generates assets for Linux distros, Windows and macOS
271
+ all : clean windows linux darwin
271
272
@echo " Completed all cross-platform builds ..."
272
273
273
274
.PHONY : quick
@@ -631,6 +632,114 @@ linux-arm64-links:
631
632
632
633
@echo "Completed generating download links for linux arm64 assets"
633
634
635
+ .PHONY : darwin-amd64-build
636
+ # # darwin-amd64-build: builds assets for macOS amd64 systems
637
+ darwin-amd64-build :
638
+ @echo " Building release assets for darwin amd64 ..."
639
+
640
+ @set -e; for target in $(WHAT); do \
641
+ mkdir -p $(ASSETS_PATH)/$$target && \
642
+ echo " building $$target amd64 binary" && \
643
+ env GOOS=darwin GOARCH=amd64 $(BUILDCMD) -o $(ASSETS_PATH)/$$target/$$target-darwin-amd64 $(PROJECT_DIR)/cmd/$$target; \
644
+ done
645
+
646
+ @echo "Completed build tasks for darwin amd64"
647
+
648
+ .PHONY : darwin-amd64-compress
649
+ # # darwin-amd64-compress: compresses generated macOS amd64 assets
650
+ darwin-amd64-compress :
651
+ @echo " Compressing release assets for darwin amd64 ..."
652
+
653
+ @set -e; for target in $(WHAT); do \
654
+ echo " compressing $$target amd64 binary" && \
655
+ $(COMPRESSCMD) $(ASSETS_PATH)/$$target/$$target-darwin-amd64 > \
656
+ $(ASSETS_PATH)/$$target/$$target-darwin-amd64.xz && \
657
+ rm -f $(ASSETS_PATH)/$$target/$$target-darwin-amd64; \
658
+ done
659
+
660
+ @echo "Completed compress tasks for darwin amd64"
661
+
662
+ .PHONY : darwin-amd64-checksums
663
+ # # darwin-amd64-checksums: generates checksum files for macOS amd64 assets
664
+ darwin-amd64-checksums :
665
+ @echo " Generating checksum files for darwin amd64 assets ..."
666
+
667
+ @set -e; for target in $(WHAT); do \
668
+ echo " generating $$target checksum file" && \
669
+ cd $(ASSETS_PATH)/$$target && \
670
+ $(CHECKSUMCMD) $$target-darwin-amd64.xz > $$target-darwin-amd64.xz.sha256 && \
671
+ cd $$OLDPWD; \
672
+ done
673
+
674
+ @echo "Completed generation of checksum files for darwin amd64"
675
+
676
+ .PHONY : darwin-amd64-links
677
+ # # darwin-amd64-links: generates download URLs for macOS amd64 assets
678
+ darwin-amd64-links :
679
+ @echo " Generating download links for darwin amd64 assets ..."
680
+
681
+ @set -e; for target in $(WHAT); do \
682
+ echo " generating $$target download links" && \
683
+ echo "$(BASE_URL)/$(RELEASE_TAG)/$$target-darwin-amd64.xz" >> $(ALL_DOWNLOAD_LINKS_FILE) && \
684
+ echo "$(BASE_URL)/$(RELEASE_TAG)/$$target-darwin-amd64.xz.sha256" >> $(ALL_DOWNLOAD_LINKS_FILE); \
685
+ done
686
+
687
+ @echo "Completed generating download links for darwin amd64 assets"
688
+
689
+ .PHONY : darwin-arm64-build
690
+ # # darwin-arm64-build: builds assets for macOS arm64 systems
691
+ darwin-arm64-build :
692
+ @echo " Building release assets for darwin arm64 ..."
693
+
694
+ @set -e; for target in $(WHAT); do \
695
+ mkdir -p $(ASSETS_PATH)/$$target && \
696
+ echo " building $$target arm64 binary" && \
697
+ env GOOS=darwin GOARCH=arm64 $(BUILDCMD) -o $(ASSETS_PATH)/$$target/$$target-darwin-arm64 $(PROJECT_DIR)/cmd/$$target; \
698
+ done
699
+
700
+ @echo "Completed build tasks for darwin arm64"
701
+
702
+ .PHONY : darwin-arm64-compress
703
+ # # darwin-arm64-compress: compresses generated macOS arm64 assets
704
+ darwin-arm64-compress :
705
+ @echo " Compressing release assets for darwin arm64 ..."
706
+
707
+ @set -e; for target in $(WHAT); do \
708
+ echo " compressing $$target arm64 binary" && \
709
+ $(COMPRESSCMD) $(ASSETS_PATH)/$$target/$$target-darwin-arm64 > \
710
+ $(ASSETS_PATH)/$$target/$$target-darwin-arm64.xz && \
711
+ rm -f $(ASSETS_PATH)/$$target/$$target-darwin-arm64; \
712
+ done
713
+
714
+ @echo "Completed compress tasks for darwin arm64"
715
+
716
+ .PHONY : darwin-arm64-checksums
717
+ # # darwin-arm64-checksums: generates checksum files for macOS arm64 assets
718
+ darwin-arm64-checksums :
719
+ @echo " Generating checksum files for darwin arm64 assets ..."
720
+
721
+ @set -e; for target in $(WHAT); do \
722
+ echo " generating $$target checksum file" && \
723
+ cd $(ASSETS_PATH)/$$target && \
724
+ $(CHECKSUMCMD) $$target-darwin-arm64.xz > $$target-darwin-arm64.xz.sha256 && \
725
+ cd $$OLDPWD; \
726
+ done
727
+
728
+ @echo "Completed generation of checksum files for darwin arm64"
729
+
730
+ .PHONY : darwin-arm64-links
731
+ # # darwin-arm64-links: generates download URLs for macOS arm64 assets
732
+ darwin-arm64-links :
733
+ @echo " Generating download links for darwin arm64 assets ..."
734
+
735
+ @set -e; for target in $(WHAT); do \
736
+ echo " generating $$target download links" && \
737
+ echo "$(BASE_URL)/$(RELEASE_TAG)/$$target-darwin-arm64.xz" >> $(ALL_DOWNLOAD_LINKS_FILE) && \
738
+ echo "$(BASE_URL)/$(RELEASE_TAG)/$$target-darwin-arm64.xz.sha256" >> $(ALL_DOWNLOAD_LINKS_FILE); \
739
+ done
740
+
741
+ @echo "Completed generating download links for darwin arm64 assets"
742
+
634
743
.PHONY : linux-x86
635
744
# # linux-x86: generates assets for Linux x86
636
745
linux-x86 : linux-x86-build linux-x86-compress linux-x86-checksums
@@ -656,6 +765,26 @@ linux: linux-x86 linux-x64 linux-arm64
656
765
linux-links : linux-x86-links linux-x64-links linux-arm64-links
657
766
@echo " Completed generating download links for linux x86, x64, and arm64 assets"
658
767
768
+ .PHONY : darwin-amd64
769
+ # # darwin-amd64: generates assets for macOS amd64
770
+ darwin-amd64 : darwin-amd64-build darwin-amd64-compress darwin-amd64-checksums
771
+ @echo " Completed all tasks for darwin amd64"
772
+
773
+ .PHONY : darwin-arm64
774
+ # # darwin-arm64: generates assets for macOS arm64
775
+ darwin-arm64 : darwin-arm64-build darwin-arm64-compress darwin-arm64-checksums
776
+ @echo " Completed all tasks for darwin arm64"
777
+
778
+ .PHONY : darwin
779
+ # # darwin: generates assets for macOS amd64 and arm64 systems
780
+ darwin : darwin-amd64 darwin-arm64
781
+ @echo " Completed all tasks for darwin"
782
+
783
+ .PHONY : darwin-links
784
+ # # darwin-links: generates download URLs for macOS amd64 and arm64 assets
785
+ darwin-links : darwin-amd64-links darwin-arm64-links
786
+ @echo " Completed generating download links for darwin amd64 and arm64 assets"
787
+
659
788
.PHONY : packages-stable
660
789
# # packages-stable: generates "stable" release series DEB and RPM packages
661
790
packages-stable : linux-x64-build
@@ -813,7 +942,7 @@ package-links:
813
942
814
943
.PHONY : links
815
944
# # links: generates download URLs for release assets
816
- links : windows-x86-links windows-x64-links linux-x86-links linux-x64-links linux-arm64-links package-links
945
+ links : windows-x86-links windows-x64-links linux-x86-links linux-x64-links linux-arm64-links darwin-amd64-links darwin-arm64-links package-links
817
946
@echo " Completed generating download links for all release assets"
818
947
819
948
.PHONY : dev-build
@@ -823,7 +952,7 @@ dev-build: clean linux-x64-dev-build packages-dev package-links linux-x64-dev-co
823
952
824
953
.PHONY : release-build
825
954
# # release-build: generates stable build assets for public release
826
- release-build : clean windows linux-x86 linux-arm64 packages-dev clean-linux-x64-dev packages-stable linux-x64-compress linux-x64-checksums links
955
+ release-build : clean windows linux-x86 linux-arm64 packages-dev clean-linux-x64-dev packages-stable linux-x64-compress linux-x64-checksums darwin links
827
956
@echo " Completed all tasks for stable release build"
828
957
829
958
.PHONY : helper-builder-setup
0 commit comments