Skip to content

Commit

Permalink
add q&d mac signing & notarization
Browse files Browse the repository at this point in the history
  • Loading branch information
batmac committed May 8, 2024
1 parent 245be95 commit b99c2f7
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 2 deletions.
16 changes: 16 additions & 0 deletions .gon.hcl
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
source = ["./ccat"]
bundle_id = "com.sbz.ccat"

sign {
application_identity = "Developer ID Application"
}

# for stapling
dmg {
output_path = "ccat.dmg"
volume_name = "ccat"
}

zip {
output_path = "ccat.zip"
}
7 changes: 5 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@ janitor:
pre-commit autoupdate

release:
goreleaser release --rm-dist
goreleaser release --clean
echo "go to https://github.com/batmac/ccat/releases and create a new release"

.PHONY: build test thanks janitor release all clean
macsign:
gon .gon.hcl

.PHONY: build test thanks janitor release all clean macsign
11 changes: 11 additions & 0 deletions magefiles/magefile.go
Original file line number Diff line number Diff line change
Expand Up @@ -215,3 +215,14 @@ func stepOKPrintln(a ...any) {
}
fmt.Println(append([]any{prefix + "✅"}, a...)...)
}

func Macsign() error {
if runtime.GOOS != "darwin" {
fmt.Println("❗️Skipping macOS signing on non-macOS platform")
}
stepPrintln("Signing and Notarizing for macOS with `gon` ...")
if err := sh.RunV("gon", ".gon.hcl"); err != nil {
return err
}
return nil
}

0 comments on commit b99c2f7

Please sign in to comment.