⛩️ Powerful yet Minimal Nix Dependency Manager
flake flakes home-manager nixos go nix dependency dependencies
0
fork

Configure Feed

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

feat(yae): prevent updates with pinning

Fuwn 89e6466d 01cdbad1

+17
+1
sources.go
··· 17 17 URITemplate string `json:"uri_template,omitempty"` 18 18 TagPredicate string `json:"tag_predicate,omitempty"` 19 19 TrimTagPrefix string `json:"trim_tag_prefix,omitempty"` 20 + Pinned bool `json:"pinned,omitempty"` 20 21 } 21 22 22 23 func (s *Sources) EnsureLoaded() error {
+16
yae.go
··· 97 97 Name: "trim-tag-prefix", 98 98 Usage: "A prefix to trim from remote git tags", 99 99 }, 100 + &cli.BoolFlag{ 101 + Name: "pin", 102 + Usage: "Prevent the source from being updated", 103 + }, 100 104 }, 101 105 Action: func(c *cli.Context) error { 102 106 if c.Args().Len() != 2 { ··· 130 134 131 135 if c.String("trim-tag-prefix") != "" { 132 136 source.TrimTagPrefix = c.String("trim-tag-prefix") 137 + } 138 + 139 + if c.Bool("pin") { 140 + source.Pinned = true 133 141 } 134 142 135 143 if sha256, err := fetchSHA256(source.URI, c.Bool("unpack"), !c.Bool("silent")); err != nil { ··· 296 304 297 305 if !sources.Exists(name) { 298 306 return updated, fmt.Errorf("source does not exist") 307 + } 308 + 309 + if source.Pinned { 310 + if show { 311 + fmt.Println("skipped update for", name, "because it is pinned") 312 + } 313 + 314 + return updated, nil 299 315 } 300 316 301 317 if source.Type == "git" {