Skip to content

Commit

Permalink
Core/multiplatform binaries (#22)
Browse files Browse the repository at this point in the history
* Saving progress: making a Makefile to handle building and publishing

* Adding some platform specific builds and publishing commands to the Makefile; Adding directories for platform binary output

* Changing package json bin location and adding a default bin created by makefile

* Typo in Makefile

* Adding a postinstall script to swap default bin with os viable bin

* Fixing a couple typos

* Got Makefile mostly working

* Finished with Makefile

* Adding a clean action to Makefile

* Tweaking publish checks in Makefile

* Adjusting optionalDeps versions

* Forgot to include the postinstall script inthe pacakge json files

* Adding windows support

* Adding the windows builds to the publish-all make target/action

* Adding platform-all and all targets
  • Loading branch information
ehutchllew authored May 15, 2024
1 parent 5857c91 commit af5385f
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ GO_FLAGS += -trimpath
version:
@echo "Version: $(VERSION)"

.PHONY all:
all: | publish-all clean

.PHONY clean:
clean:
rm -f npm/README.md npm/LICENSE &&\
Expand Down Expand Up @@ -47,9 +50,11 @@ copy-files:
cp README.md LICENSE npm/@tmplts/windows-ia32/
cp README.md LICENSE npm/@tmplts/windows-x64/


##############
# Publishing #
##############

.PHONY: publish-all
publish-all: copy-files
@echo "Attempting to publish all supported binaries..."
Expand Down Expand Up @@ -96,6 +101,19 @@ publish-windows-x64: platform-windows-x64
##################
# Platform Build #
##################
.PHONY: platform-all:
platform-all:
@echo "Attempting to generate all supported platform binaries..."

@$(MAKE) --no-print-directory -j4 \
platform-default \
platform-darwin-arm64 \
platform-darwin-x64 \
platform-linux-x64 \
platform-windows-arm64 \
platform-windows-ia32 \
platform-windows-x64

platform-unixlike:
@test -n "$(TGOOS)" || (echo "The environment variable GOOS must be provided" && false)
@test -n "$(TGOARCH)" || (echo "The environment variable GOARCH must be provided" && false)
Expand Down

0 comments on commit af5385f

Please sign in to comment.