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