⛩️ 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): tag predicate prefix trimming

Fuwn 01cdbad1 e8990199

+30 -8
+10 -1
README.md
··· 40 40 zen-browser-bin \ 41 41 'https://github.com/zen-browser/desktop/releases/download/{version}/zen.linux-specific.tar.bz2' 42 42 43 + # Adds a Yae dependency named `yaak` pinned at tag `2024.10.1` with tag trimming for updates 44 + yae add \ 45 + --type git \ 46 + --unpack=false \ 47 + --version 2024.10.1 \ 48 + --trim-tag-prefix v \ 49 + yaak \ 50 + 'https://github.com/yaakapp/app/releases/download/v{version}/yaak_{version}_amd64.AppImage.tar.gz' 51 + 43 52 # Updates all dependencies, e.g., updates the hash of `zen-browser-twilight-bin` 44 53 # and bumps the version of `zen-browser-bin` to `1.0.1-a.8`, handling URI and 45 - # hash recalculations 54 + # hash recalculations, etc. 46 55 yae update 47 56 48 57 # Only updates `zen-browser-twilight-bin`
+8 -7
sources.go
··· 9 9 type Sources map[string]Source 10 10 11 11 type Source struct { 12 - URI string `json:"url"` 13 - SHA256 string `json:"sha256"` 14 - Unpack bool `json:"unpack"` 15 - Type string `json:"type"` 16 - Version string `json:"version,omitempty"` 17 - URITemplate string `json:"uri_template,omitempty"` 18 - TagPredicate string `json:"tag_predicate,omitempty"` 12 + URI string `json:"url"` 13 + SHA256 string `json:"sha256"` 14 + Unpack bool `json:"unpack"` 15 + Type string `json:"type"` 16 + Version string `json:"version,omitempty"` 17 + URITemplate string `json:"uri_template,omitempty"` 18 + TagPredicate string `json:"tag_predicate,omitempty"` 19 + TrimTagPrefix string `json:"trim_tag_prefix,omitempty"` 19 20 } 20 21 21 22 func (s *Sources) EnsureLoaded() error {
+12
yae.go
··· 93 93 Name: "silent", 94 94 Usage: "Silence output", 95 95 }, 96 + &cli.StringFlag{ 97 + Name: "trim-tag-prefix", 98 + Usage: "A prefix to trim from remote git tags", 99 + }, 96 100 }, 97 101 Action: func(c *cli.Context) error { 98 102 if c.Args().Len() != 2 { ··· 122 126 123 127 if source.Type == "git" && c.String("tag-predicate") != "" { 124 128 source.TagPredicate = c.String("tag-predicate") 129 + } 130 + 131 + if c.String("trim-tag-prefix") != "" { 132 + source.TrimTagPrefix = c.String("trim-tag-prefix") 125 133 } 126 134 127 135 if sha256, err := fetchSHA256(source.URI, c.Bool("unpack"), !c.Bool("silent")); err != nil { ··· 271 279 break 272 280 } 273 281 } 282 + } 283 + 284 + if source.TrimTagPrefix != "" { 285 + latest = strings.TrimPrefix(latest, source.TrimTagPrefix) 274 286 } 275 287 276 288 return latest, nil