I am trying to publish an elm package after pushing it to Github at https://github.com/Viir/onlinegamemaker/tree/1.0.0/implement/elm/package/simplegamedev.
But I get this error message from
X Version 1.0.0 is not tagged on GitHub!
-- NO TAG ----------------------------------------------------------------------
Packages must be tagged in git, but I cannot find a 1.0.0 tag.
These tags make it possible to find this specific version on GitHub.
To tag the most recent commit and push it to GitHub, run this:
git tag -a 1.0.0 -m "new release"
git push origin 1.0.0
The -m flag is for a helpful message. Try to make it more informative!
Following is the output from git when following the instructions:
> git tag -a 1.0.0 -m "Support elm publish"
fatal: tag '1.0.0' already exists
> git push origin 1.0.0
fatal: 'origin' does not appear to be a git repository
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
After this error message, I guess the that the remote suggested by elm publish is not right. When I adapt the git command to use the actual remote, it looks like pushing the tag works:
> git push viir 1.0.0
Github displays the tag
1.0.0 in the UI: https://github.com/Viir/onlinegamemaker/tree/1.0.0/implement/elm/package/simplegamedev
But when I run elm publish again, it still says:
Version 1.0.0 is not tagged on GitHub!
What else does elm publish need to see the tag on Github?
I’m not sure if it is the same issue, but maybe related to this? https://github.com/elm/compiler/issues/1904
The name of your repo is different from the name on your elm.json, so maybe that is the issue.
Thanks @joakin for the tip!
Yes that issue is related.
I applied the workaround described there and copied the package to a dedicated repository. This seems to work, as
elm install recognized the package now. I do not find the package on Ellie yet, which is the goal, but I suspect that is an outdated cache.
I am still interested to learn how elm publish works normally, or if there is a simpler workaround.
As far as I know,
elm publish requires that the
<username>/<respository>, corresponding to
elm publish help text telling you how to create GitHub tag that matches the
elm.json is just that, help text. If you’ve configured your repository in the standard way, with the
origin remote corresponding to the
master branch, then you can use those commands as is. Otherwise, you have to change them as you did.
If you understand Haskell, you can see details at https://github.com/elm/compiler/blob/master/builder/src/Elm/Publish.hs
Thanks @billstclair for the hint.
That is an interesting idea, where is this coming from? Do you think that it is intended to work this way?
That is good to know. I do not understand Haskell, at least not yet
Maybe I can find out more about why it behaves this way in this source code.
This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.