Live video on the AT Protocol
79
fork

Configure Feed

Select the types of activity you want to include in your feed.

will this work

+9 -10
+1 -1
js/desktop/package.json
··· 11 11 "make": "electron-forge make", 12 12 "publish": "electron-forge publish", 13 13 "nolint": "eslint --ext .ts,.tsx .", 14 - "prepare": "if [ -z \"$CF_PAGES\" ]; then CGO_ENABLED=0 go run ../../pkg/config/git/git.go --js > src/version.ts; else echo 'export const version = \"unknown\"; export const buildTime = 0; export const uuid = \"00000000-0000-0000-0000-000000000000\";' > src/version.ts; fi" 14 + "prepare": "CGO_ENABLED=0 go run ../../pkg/config/git/git.go --js > src/version.ts" 15 15 }, 16 16 "devDependencies": { 17 17 "@electron-forge/cli": "^7.5.0",
+8 -9
pkg/config/git/git.go
··· 82 82 homebrew := flag.Bool("homebrew", false, "print homebrew formula") 83 83 84 84 flag.Parse() 85 - r, err := git.PlainOpenWithOptions(".", &git.PlainOpenOptions{DetectDotGit: true}) 86 - if err != nil { 87 - // fallback for CI environments without full git history 88 - var out string 89 - if *javascript { 90 - out = fmt.Sprintf(tmplJS, "unknown", 0, "00000000-0000-0000-0000-000000000000") 91 - } else { 92 - out = fmt.Sprintf(tmpl, "unknown", 0, "00000000-0000-0000-0000-000000000000") 93 - } 85 + 86 + // handle CF_PAGES environment fallback 87 + if os.Getenv("CF_PAGES") != "" && *javascript { 88 + out := `export const version = "unknown"; export const buildTime = 0; export const uuid = "00000000-0000-0000-0000-000000000000";` 94 89 if *output != "" { 95 90 if err := os.WriteFile(*output, []byte(out), 0644); err != nil { 96 91 return err ··· 99 94 fmt.Print(out) 100 95 } 101 96 return nil 97 + } 98 + r, err := git.PlainOpenWithOptions(".", &git.PlainOpenOptions{DetectDotGit: true}) 99 + if err != nil { 100 + return err 102 101 } 103 102 104 103 // ... retrieving the HEAD reference