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

opam-web.sh: append the redirect to the repo file, instead of replacing the entire file #234

Merged
merged 1 commit into from
May 29, 2024
Merged

Conversation

hannesm
Copy link
Contributor

@hannesm hannesm commented May 29, 2024

//cc @kit-ty-kate -- this should do the trick, or shouldn't it?

browse: "https://${BASEURL}/pkg/"
upstream: "https://github.com/ocaml/opam-repository/tree/master/"
# Append to the 'repo' file, and dispatch all non-standard versions
cat <<EOF >>repo
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
cat <<EOF >>repo
sed -i 's/^browse: /d' repo
cat <<EOF >>repo
browse: "https://${BASEURL}/pkg/"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but why? In opam-repository the browse points to https://opam.ocaml.org/pkg (and aside, what is browse used for?)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and aside, what is browse used for?

no idea. @rjbou do you know what it's used for?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I removed my commit

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FWIW, https://opam.ocaml.org/pkg/ returns an empty page (404, Not found). In the opam sources, there's nothing using the browse from OpamFile.RepoSyntax. From the Manual.md: * <a id="repofield-browse">`browse: <string>`</a>: An URL where the users may browse available packages online

@kit-ty-kate kit-ty-kate merged commit 77d2867 into ocaml-opam:master May 29, 2024
2 checks passed
@hannesm hannesm deleted the append-not-overwrite branch May 29, 2024 20:41
@kit-ty-kate
Copy link
Contributor

now live after testing it on staging.opam.ocaml.org (sorry for the delay i was at EMF)

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.

Use opam-repository's repo file as a base instead of re-creating one from scratch
2 participants