Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update registry by adding all known packages #69

Merged
merged 5 commits into from
Feb 18, 2024

Conversation

amtoine
Copy link
Member

@amtoine amtoine commented Feb 18, 2024

followup to #56

Description

this should update the registry.nuon file thanks to the content of previous index.nuon (see cbca144 for the pipeline used to update the registry).

this PR uses the latest version of each package.

try it out

nupm search --registry ./registry.nuon explore
    | into record
    | update pkgs { into record }
    | table --expand
────┬──────────────────────────────────────────────────────
name│registry
path│./registry.nuon
    │────────┬─────────────────────────────────────────────
pkgs│name    │nu_plugin_explore
    │version │0.1.2
    │url     │https://github.com/:amtoine/nu_plugin_explore
    │revision│0.1.2
    │path    │.
    │type    │git
    │────────┴─────────────────────────────────────────────
────┴──────────────────────────────────────────────────────

this uses the content of `index.nuon` and the following pipeline to
automate the process:
```nushell
open index.nuon
    | update package { str replace "github.com:" "https://raw.githubusercontent.com/" }
    | each {|it|
        let url = if $it.dir? != null {
            [$it.package, "main", $it.dir, "nupm.nuon" ] | str join "/"
        } else {
            [$it.package, "main", "nupm.nuon" ] | str join "/"
        }

        print $url
        http get $url
    }
    | to nuon --indent 4
```
@amtoine amtoine requested a review from kubouch February 18, 2024 15:47
some packages don't have a tag that's the same as the package version,
they should use a branch name or a commit hash.
registry.nuon Outdated Show resolved Hide resolved
registry.nuon Show resolved Hide resolved
@amtoine amtoine requested a review from kubouch February 18, 2024 17:42
@kubouch kubouch merged commit f7e8155 into nushell:main Feb 18, 2024
3 checks passed
@amtoine amtoine deleted the update-registry branch February 19, 2024 22:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants