Open ghost opened 4 years ago
According to the doc, I can do it by passing --delegate github-dune-release-delegate
, however that doesn't seem to work:
$ dune-release publish distrib --verbose -n dune --delegate github-dune-release-delegate
dune-release: [INFO] dune-release 1.3.3 running
[-] Publishing distribution
[-] Using delegate github-dune-release-delegate
dune-release: [INFO] Parsing opam file dune.opam
dune-release: [ERROR] Delegate github-dune-release-delegate errored with 127
Ah, after reading the code I found that it works if you set the environment variable instead:
$ DUNE_RELEASE_DELEGATE=github-dune-release-delegate dune-release publish distrib --verbose -n dune
[...]
I guess the doc and code are not in sync and one of them needs to be updated.
Yeah we definitely need to do something about this, in particular it should fallback to github if the dev-repo is on github
Indeed. From a user point of view, the current behaviour is a bit surprising. Indeed, delegates seems like an advanced feature while changing the documentation page is a basic feature. The user shouldn't be confronted with advanced features problems when they only did basic things. So it seems to me that setting a delegate should be done explicitly, not guessed implicitly.
I totally agree, we have a plan to get rid of delegates by the way so this should soon be a problem of the past: https://github.com/ocamllabs/dune-release/issues/188
An extension of this: I you have 2 packages in the same repository, and you go through what @diml describes, the opam file generated by the "main" package is correct, but not the other, they fallback to something like $HOMEPAGE/$TARBALL
instead of $GITHUB/.../$TARBALL
as they should.
For others with this problem, this seems to work:
dune-release distrib
step as usual.homepage: "https://github.com/ORG/REPO"
(but don't commit).dune-release publish
._build/$main.url
as _build/$other-pkg.url
for each sub-package.dune-release opam pkg
.dune-release opam submit
.FTR, that's what we have in the Makefile
of dune:
opam-release:
dune-release distrib --skip-build --skip-lint --skip-tests -n dune
# See https://github.com/ocamllabs/dune-release/issues/206
DUNE_RELEASE_DELEGATE=github-dune-release-delegate dune-release publish distrib --verbose -n dune
dune-release opam pkg -n dune
dune-release opam submit -n dune
I found a link to this issue in pp's release script. I was able to run it without the delegate env variable. Seeing as #188 is closed, shall we close this issue as well as resolved?
In this PR I am proposing to simplify pp's release script: https://github.com/ocaml-dune/pp/pull/22
Running
dune-release publish distrib
in thedune
repo fails as follow:Can I force
dune-release
to consider the project as a normal github project?