Closed grayswandyr closed 6 years ago
"message": "Bad credentials",
It seems you have a github authentication failure. See toy-github-topkg-delegate --help
to see how it is performed.
Thanks, the Github token was wrong (I had used opam-publish but it hadn't worked, and I don't know how it got a token itself), I just overwrote it with a freshly-generated one and it worked.
Now topkg opam submit
complains that the name and version are present in the opam file... I didn't had the version field myself, I thought it was precisely the purpose of a topkg subcommand to add it by itself... I guess I don't understand the workflow fully yet (I would love comments here). Here is what I did:
git flow release start 0.1.2 # git flow creates a branch for 0.1.2, to prepare a release cleanly
... editing CHANGES.md and a few other files...
git commit -am "..."
git flow finish # merges back in master, switch to master
git push github # the github remote
git push --tags github
topkg distrib
topkg publish # fixed thanks to you
topkg opam pkg
And then:
$ topkg opam submit
Submitting _build/electrod.0.1.2
[electrod-0.1.2.tbz] http://github.com/grayswandyr/electrod/releases/download/0.1.2/electrod-0.1.2.tbz downloaded
[ERROR] In /home/dchemoui/REPOS/Electrod/electrod-dev/_build/electrod.0.1.2/opam:
warning 99: should not contain 'name' or 'version' fields
Go on submitting, ignoring the warnings ? [Y/n] n
Aborting
Remove this line from your opam file.
The workflow is described in topkg help release
.
OK. Sorry I don't recall reading that the name should not be present either. I guess I should create a new version now as the tag has already been pushed?
Besides, when does watermarking take effect? Is it in topkg distrib
? (If so, I think it would be nice ton mention this in the release help.)
Pushing is handled by topkg publish
?
OK. Sorry I don't recall reading that the name should not be present either.
It's not written there but OTOH the opam lint
message is quite clear. In general you can safely assume that you should not have name:
or version:
fields in opam
files.
Is it in topkg distrib?
Yes the details of what happens are here.
(topkg
's documentation is not well organized, next time I'll put less in the manpages and direct to the API docs so that things can be properly hyperlinked, especially now that we have odoc
manuals).
OK thank you again for your help and your work. Just for the record, concerning linting, I had done it:
~/Electrod $ cat electrod.opam
opam-version: "1.2"
name: "electrod"
maintainer: "David Chemouil <david.chemouil+git@onera.fr>"
authors: ["David Chemouil" "Julien Brunel"]
homepage: "https://github.com/grayswandyr/electrod/"
bug-reports: "https://github.com/grayswandyr/electrod/issues"
license: "MPL-2.0"
dev-repo: "https://github.com/grayswandyr/electrod.git"
build: [
["jbuilder" "subst" "-p" name] {pinned}
["jbuilder" "build" "-p" name "-j" jobs]
]
depends: [
"ocamlfind" {build}
"jbuilder" {build & >="1.0+beta9"}
"topkg" {build & >= "0.9.0"}
"cmdliner"
"containers"
"fmt"
"gen"
"hashcons"
"logs"
"menhir"
"mtime"
"ppx_blob"
"ppx_deriving"
"printbox"
"sequence"
"visitors"
]
available: [ocaml-version >= "4.04"]
~/Electrod $ opam lint electrod.opam
~/REPOS/Electrod/electrod-dev/electrod.opam: Passed.
~/Electrod $ topkg lint
[ OK ] File CHANGES.md is present.
[ OK ] File LICENSE.md is present.
[ OK ] File README.md is present.
[ OK ] File electrod.opam is present.
[ OK ] lint opam file electrod.opam.
[ OK ] lint /home/dchemoui/REPOS/Electrod/electrod-dev success
Yes unfortunately opam lint
differs from the linting done by opam publish submit
(which is the command behind topkg opam submit
, I thought there was an issue somewhere upstream but I can't find it. I think it would be good to report it to opam
.
OK I will report this.
Hi
I'm just switched to Dune and I'm now trying to publish an OPAM package using topkg. My repo is here. It seems everything goes well until reaching:
I suppose I'm doing something wrong but I can't find what. FWIW, I work behing a proxy...