fork of https://github.com/sourcegraph/zoekt
0

Configure Feed

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

indexserver: support SG_PRIORITY file for FS fake (#350)

This adds support for overriding the priority indexserver receives when
using the FS as the sourcegraph url.

Test Plan: Ran the following and indexserver updated the meta file with
the new priority

go run ./cmd/zoekt-sourcegraph-indexserver -sourcegraph_url ~/src/github.com/sourcegraph/
echo 100 > ~/src/github.com/sourcegraph/sourcegraph/SG_PRIORITY

+7
+7
cmd/zoekt-sourcegraph-indexserver/sg.go
··· 445 445 _, err := os.Stat(filepath.Join(dir, p)) 446 446 return err == nil 447 447 } 448 + float := func(p string) float64 { 449 + b, _ := os.ReadFile(filepath.Join(dir, p)) 450 + f, _ := strconv.ParseFloat(string(bytes.TrimSpace(b)), 64) 451 + return f 452 + } 448 453 449 454 opts := IndexOptions{ 450 455 RepoID: sf.id(name), ··· 455 460 Public: !exists("SG_PRIVATE"), 456 461 Fork: exists("SG_FORK"), 457 462 Archived: exists("SG_ARCHIVED"), 463 + 464 + Priority: float("SG_PRIORITY"), 458 465 } 459 466 460 467 cmd := exec.Command("git", "rev-parse", "HEAD")