Skip to content

Commit b99c2f7

Browse files
committed
add q&d mac signing & notarization
1 parent 245be95 commit b99c2f7

3 files changed

Lines changed: 32 additions & 2 deletions

File tree

.gon.hcl

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
source = ["./ccat"]
2+
bundle_id = "com.sbz.ccat"
3+
4+
sign {
5+
application_identity = "Developer ID Application"
6+
}
7+
8+
# for stapling
9+
dmg {
10+
output_path = "ccat.dmg"
11+
volume_name = "ccat"
12+
}
13+
14+
zip {
15+
output_path = "ccat.zip"
16+
}

Makefile

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,10 @@ janitor:
2020
pre-commit autoupdate
2121

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

26-
.PHONY: build test thanks janitor release all clean
26+
macsign:
27+
gon .gon.hcl
28+
29+
.PHONY: build test thanks janitor release all clean macsign

magefiles/magefile.go

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,3 +215,14 @@ func stepOKPrintln(a ...any) {
215215
}
216216
fmt.Println(append([]any{prefix + "✅"}, a...)...)
217217
}
218+
219+
func Macsign() error {
220+
if runtime.GOOS != "darwin" {
221+
fmt.Println("❗️Skipping macOS signing on non-macOS platform")
222+
}
223+
stepPrintln("Signing and Notarizing for macOS with `gon` ...")
224+
if err := sh.RunV("gon", ".gon.hcl"); err != nil {
225+
return err
226+
}
227+
return nil
228+
}

0 commit comments

Comments
 (0)