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

Handle repositories using submodules in github #145

Open
aryx opened this issue Feb 7, 2023 · 1 comment
Open

Handle repositories using submodules in github #145

aryx opened this issue Feb 7, 2023 · 1 comment

Comments

@aryx
Copy link

aryx commented Feb 7, 2023

Right now opam publish uses the latest git tag in a repo and rely on github to produce the .tar.gz archive
for the source of the repository. Unfortunately, github does not add the code of submodules in the archive
(a known problem: dear-github/dear-github#214 ), and
so in most cases you can't build a project from the archive.
How opam publish could be extended to make it easy to package projects using submodules?

See for example: ocaml/opam-repository#23215 for a recent example.

@kit-ty-kate
Copy link
Contributor

This is a difficult problem. Currently opam-publish doesn’t deal with archive creation at all and mairly picks up autogenerated ones for conveinance sake.

Adding this feature to opam-publish is really involved. We’d need to:

  • create or make sure a github release is present
  • create the archive locally manually (there is no git archive option to pull submodules as far as I know)
  • upload this archive to the github release

If we only make sure the github release is present this could simplify things a lot and avoid some of the pitfalls of dune-release, but this would mean this would be a more manual approach to releasing, as currently users use opam-publish this way:

  • git tag ... && git push --tags
  • opam publish

with this option it would be something like:

  • git tag ... && git push --tags
  • create the github release by hand by going to github.com/org/proj/releases/new?tag=tag
  • opam publish --upload-archive

Incidentally this is closer to what I have for my own projects: https://github.com/kit-ty-kate/ocaml-release-script

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

No branches or pull requests

2 participants