⛩️ 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.

refactor(yae)!: change uri references to url

Fuwn 9d5c94ed 89e6466d

+15 -15
+1 -1
README.md
··· 50 50 'https://github.com/yaakapp/app/releases/download/v{version}/yaak_{version}_amd64.AppImage.tar.gz' 51 51 52 52 # Updates all dependencies, e.g., updates the hash of `zen-browser-twilight-bin` 53 - # and bumps the version of `zen-browser-bin` to `1.0.1-a.8`, handling URI and 53 + # and bumps the version of `zen-browser-bin` to `1.0.1-a.8`, handling URL and 54 54 # hash recalculations, etc. 55 55 yae update 56 56
+2 -2
sources.go
··· 9 9 type Sources map[string]Source 10 10 11 11 type Source struct { 12 - URI string `json:"url"` 12 + URL string `json:"url"` 13 13 SHA256 string `json:"sha256"` 14 14 Unpack bool `json:"unpack"` 15 15 Type string `json:"type"` 16 16 Version string `json:"version,omitempty"` 17 - URITemplate string `json:"uri_template,omitempty"` 17 + URLTemplate string `json:"url_template,omitempty"` 18 18 TagPredicate string `json:"tag_predicate,omitempty"` 19 19 TrimTagPrefix string `json:"trim_tag_prefix,omitempty"` 20 20 Pinned bool `json:"pinned,omitempty"`
+12 -12
yae.go
··· 61 61 { 62 62 Name: "add", 63 63 Args: true, 64 - ArgsUsage: "<name> <uri>", 64 + ArgsUsage: "<name> <url>", 65 65 Usage: "Add a source", 66 66 Flags: []cli.Flag{ 67 67 &cli.BoolFlag{ ··· 118 118 version := c.String("version") 119 119 120 120 if version != "" { 121 - source.URITemplate = c.Args().Get(1) 121 + source.URLTemplate = c.Args().Get(1) 122 122 source.Version = c.String("version") 123 123 124 - if strings.Contains(source.URITemplate, "{version}") { 125 - source.URI = strings.ReplaceAll(source.URITemplate, "{version}", source.Version) 124 + if strings.Contains(source.URLTemplate, "{version}") { 125 + source.URL = strings.ReplaceAll(source.URLTemplate, "{version}", source.Version) 126 126 } 127 127 } else { 128 - source.URI = c.Args().Get(1) 128 + source.URL = c.Args().Get(1) 129 129 } 130 130 131 131 if source.Type == "git" && c.String("tag-predicate") != "" { ··· 140 140 source.Pinned = true 141 141 } 142 142 143 - if sha256, err := fetchSHA256(source.URI, c.Bool("unpack"), !c.Bool("silent")); err != nil { 143 + if sha256, err := fetchSHA256(source.URL, c.Bool("unpack"), !c.Bool("silent")); err != nil { 144 144 return err 145 145 } else { 146 146 source.SHA256 = sha256 ··· 230 230 } 231 231 } 232 232 233 - func fetchSHA256(uri string, unpack bool, show bool) (string, error) { 234 - arguments := []string{"--type", "sha256", uri} 233 + func fetchSHA256(url string, unpack bool, show bool) (string, error) { 234 + arguments := []string{"--type", "sha256", url} 235 235 236 236 if unpack { 237 237 arguments = append([]string{"--unpack"}, arguments...) ··· 267 267 268 268 func fetchLatestGitTag(source Source, show bool) (string, error) { 269 269 if source.Type == "git" { 270 - repository := "https://github.com/" + strings.Split(source.URI, "/")[3] + "/" + strings.Split(source.URI, "/")[4] 270 + repository := "https://github.com/" + strings.Split(source.URL, "/")[3] + "/" + strings.Split(source.URL, "/")[4] 271 271 remotes, err := command("bash", show, "-c", fmt.Sprintf("git ls-remote --tags %s | awk -F'/' '{print $NF}' | sort -V", repository)) 272 272 273 273 if err != nil { ··· 329 329 source.Version = tag 330 330 updated = true 331 331 332 - if strings.Contains(source.URITemplate, "{version}") { 333 - source.URI = strings.ReplaceAll(source.URITemplate, "{version}", source.Version) 332 + if strings.Contains(source.URLTemplate, "{version}") { 333 + source.URL = strings.ReplaceAll(source.URLTemplate, "{version}", source.Version) 334 334 } 335 335 } 336 336 } 337 337 338 - sha256, err := fetchSHA256(source.URI, source.Unpack, show) 338 + sha256, err := fetchSHA256(source.URL, source.Unpack, show) 339 339 340 340 if err != nil { 341 341 return updated, err