Skip to content
This repository has been archived by the owner on Jan 15, 2021. It is now read-only.

yotta version - error if a tag already exists, but creates the version commit #722

Open
0xc0170 opened this issue Feb 26, 2016 · 2 comments

Comments

@0xc0170
Copy link
Contributor

0xc0170 commented Feb 26, 2016

I am running older yotta (0.12.2):

..\mbed-drivers (master)
λ yt version patch
info: @0.12.2
error: command failed: fatal: tag 'v0.12.2' already exists

C:\Code\git_repo\github\yotta_thing\mbed-drivers (master)
λ git logg -4
* f0ff915 - (HEAD, master) version v0.12.2 (68 seconds ago) <Martin Kojtal>

git reflog shows f0ff915 HEAD@{0}: commit: version v0.12.2, which should not happen. As 0.12.2 was already as a tag, I just realized the commit was missing there.. This should not happen (a person pushed a tag v0.12.2 but not the version commit) but we can see it does :-)

@0xc0170 0xc0170 changed the title yotta version - error if already exists, but amends the commit yotta version - error if a tag already exists, but creates the version commit Feb 26, 2016
@autopulated
Copy link
Contributor

the tag is created after the commit (it has to be, because it's the commit that's tagged!), but we could check for the existence of the tag first.

In this case was the module.json already set to the correct version, presumably not? So there was also some sort of preceding error which meant the module.json was at 0.12.1, but there was an existing tag for 0.12.2?

@0xc0170
Copy link
Contributor Author

0xc0170 commented Mar 2, 2016

the tag is created after the commit (it has to be, because it's the commit that's tagged!), but we could check for the existence of the tag first.

Exactly what I am proposing here. Otherwise a user needs to manually revert the last commit.

In this case was the module.json already set to the correct version, presumably not? So there was also some sort of preceding error which meant the module.json was at 0.12.1, but there was an existing tag for 0.12.2?

This was a user error, the tag was pushed upstream, but not the commit.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants