Mbed forum

Creating github tags, releases that yotta will recognize

yotta

(Aaron Campbell) #1

How does Yotta look for tags and versions on GitHub? If I specify "https://github.com/my-repo.git~1.0.1" in my module dependencies, will it check out the "v1.0.1" tag (from my "v1.0.1" release on GitHub)? Or does it just check out the HEAD? If it doesn't know to look for the "v1.0.1" tag on GitHub, how can I ensure Yotta is able to find the correct version of the module on GitHub?

I've seen this error trying to use an internal git repo:

error: Failed to satisfy dependencies of /home/aaron/myproject:
error: git repository "http://internal.server/module.git#branch_name~1.0.0" does not have any tags or branches matching "None"

And I've also seen this warning when I specify "http://internal.server/module.git#branch_name" without a version number:

info: get versions for module-name
warning: Using head of "branch_name" branch for "module-name", not a tagged version

I want to make sure users do not have to wade through such problems once I put the module on GitHub.


(Aaron Campbell) #2

I found some info about this in a comment on GitHub. Apparently yes, Yotta looks at the GitHub tags:

Normally when fetching a named module from a git/hg repo, yotta checks for semver-like tags on the repo (v1.2.3-something+whatever), and uses these to identify which version of the repo to use (if no semver tags are found you'll get the familiar "warning: XXX has no tagged versions, default branch will be used"

(The exception to this are if #namedtag or #namedbranch are used in the VCS url, in which case the tip of the named branch, or the exact named tag are used instead of the latest compatible semver).

Source: https://github.com/ARMmbed/yotta/issues/618#issuecomment-165741168