20 if len(os.Args) == 3 {
21 if os.Args[1] == "darwin" && runtime.GOOS == "darwin" {
22 rawInfoPlistString := `<?xml version="1.0" encoding="UTF-8"?>
23 <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
26 <key>CFBundleIdentifier</key>
27 <string>io.github.micro-editor</string>
28 <key>CFBundleName</key>
29 <string>micro</string>
30 <key>CFBundleInfoDictionaryVersion</key>
32 <key>CFBundlePackageType</key>
34 <key>CFBundleShortVersionString</key>
35 <string>` + os.Args[2] + `</string>
39 infoPlistData := []byte(rawInfoPlistString)
41 err := ioutil.WriteFile("/tmp/micro-info.plist", infoPlistData, 0644)
43 fmt.Println("-linkmode external -extldflags -Wl,-sectcreate,__TEXT,__info_plist,/tmp/micro-info.plist")
46 panic("missing arguments")