Skip to content

Commit

Permalink
Change mac build to fat (#414)
Browse files Browse the repository at this point in the history
* create universal

* adding new changes

Co-authored-by: Pedro Lopes <[email protected]>
  • Loading branch information
tiagobcx and pedrompflopes authored Jun 20, 2022
1 parent bc23d31 commit 93b4289
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 50 deletions.
45 changes: 14 additions & 31 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,34 +27,17 @@ builds:
- -s
- -w
- -X github.com/checkmarx/ast-cli/internal/params.Version={{.Version}}

- main: ./cmd/main.go
env:
- CGO_ENABLED=0
binary: cx
id: cx-mac-arm
goos:
- darwin
goarch:
- arm64
hooks:
post: gon gonArm.hcl
ldflags:
- -s
- -w
- -X github.com/checkmarx/ast-cli/internal/params.Version={{.Version}}

- main: ./cmd/main.go
env:
- CGO_ENABLED=0
binary: cx
id: cx-mac-amd
id: cx-mac-universal
goos:
- darwin
goarch:
- amd64
hooks:
post: gon gonAmd.hcl
- arm
- arm64
ldflags:
- -s
- -w
Expand All @@ -81,20 +64,20 @@ archives:
386: x32
files:
- LICENSE
- id: cx-mac-arm-archive
builds:
- cx-mac-arm
files:
- LICENSE
- ./dist/cx-mac-arm_darwin_arm64/cx.dmg
- id: cx-mac-amd-archive
- id: cx-mac-universal
builds:
- cx-mac-amd
replacements:
amd64: x64
- cx-mac-universal
files:
- LICENSE
- ./dist/cx-mac-amd_darwin_amd64/cx.dmg
- ./dist/cx-mac-universal_darwin_all/cx.dmg
name_template: "{{ .ProjectName }}_{{ .Version }}_darwin_x64"

universal_binaries:
- id: cx-mac-universal
replace: true
name_template: "cx"
hooks:
post: gon gonMac.hcl

brews:
- tap:
Expand Down
17 changes: 0 additions & 17 deletions gonArm.hcl

This file was deleted.

4 changes: 2 additions & 2 deletions gonAmd.hcl → gonMac.hcl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# gonArm.hcl
source = ["./dist/cx-mac-amd_darwin_amd64/cx"]
source = ["./dist/cx-mac-universal_darwin_all/cx"]
bundle_id = "com.checkmarx.cli"

apple_id {
Expand All @@ -12,6 +12,6 @@ sign {
}

dmg {
output_path = "./dist/cx-mac-amd_darwin_amd64/cx.dmg"
output_path = "./dist/cx-mac-universal_darwin_all/cx.dmg"
volume_name = "cx"
}

0 comments on commit 93b4289

Please sign in to comment.