Skip to content

Commit

Permalink
Compile more binaries for arm64 + amd64
Browse files Browse the repository at this point in the history
Having more binaries ready to run the plugin enhances the compatibility in different environments.

see #68368
  • Loading branch information
martinrode committed May 30, 2023
1 parent 78b4c65 commit 9dbb928
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
9 changes: 6 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,12 @@ help:
all: build ## build all

build: ## build files in build folder
cd html2pdf; GOOS=linux go build -o ../build/server-pdf/html2pdf-linux.exe
cd html2pdf; GOOS=windows go build -o ../build/server-pdf/html2pdf-windows.exe
cd html2pdf; GOOS=darwin GOARCH=amd64 go build -o ../build/server-pdf/html2pdf-darwin.exe
cd html2pdf; CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o ../build/server-pdf/html2pdf-linux-amd64.exe
cd html2pdf; CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -o ../build/server-pdf/html2pdf-linux-arm64.exe
cd html2pdf; CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -o ../build/server-pdf/html2pdf-windows-amd64.exe
cd html2pdf; CGO_ENABLED=0 GOOS=windows GOARCH=arm64 go build -o ../build/server-pdf/html2pdf-windows-arm64.exe
cd html2pdf; CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -o ../build/server-pdf/html2pdf-darwin-amd64.exe
cd html2pdf; CGO_ENABLED=0 GOOS=darwin GOARCH=arm64 go build -o ../build/server-pdf/html2pdf-darwin-arm64.exe
cp -r manifest.master.yml build/server-pdf/manifest.yml

clean: ## clean
Expand Down
2 changes: 1 addition & 1 deletion apitest/pdf1.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "Dump Info Hello",
"name": "Create PDF",
"request": {
"method": "POST",
"endpoint": "plugin/base/server-pdf/html2pdf",
Expand Down
2 changes: 1 addition & 1 deletion manifest.master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ extensions:
exec:
service: "exec"
commands:
- prog: "%_exec.pluginDir%/html2pdf-%_exec.GOOS%.exe"
- prog: "%_exec.pluginDir%/html2pdf-%_exec.GOOS%-%_exec.GOARCH%.exe"
stdin:
type: "body"
stdout:
Expand Down

0 comments on commit 9dbb928

Please sign in to comment.