This repository has been archived by the owner on Jan 15, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #802 from ARMmbed/hash-support
Git and GitHub support rework
- Loading branch information
Showing
10 changed files
with
249 additions
and
115 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,18 +24,33 @@ Sometimes it may not be appropriate publish a module to the public package regis | |
|
||
The shorthand GitHub URL is formed of two parts: `<username>/<reponame>` where `<username>` is the GitHub user or organisation name of the repository owner and `<reponame>` is the name of the repositiry. e.g. the `yotta` repositry can be found at `ARMmbed/yotta`. | ||
|
||
You can specify a particular branch or tag to use by providing it in the URL. The supported GitHub URL formats are: | ||
You can specify a particular branch, tag or commit to use by providing it in the URL. The supported GitHub URL formats are: | ||
|
||
``` | ||
username/reponame | ||
username/reponame#<versionspec> | ||
username/reponame#<branchname> | ||
username/reponame#<tagname> | ||
username/reponame#<commit> | ||
https://github.com/username/reponame | ||
https://github.com/username/reponame#<branchname> | ||
https://github.com/username/reponame#<tagname> | ||
https://github.com/username/reponame#<commit> | ||
``` | ||
|
||
If the GitHub repository is public, the dependency will simply be downloaded. If the GitHub repository is private and this is the first time you are downloading from a private GitHub repository, you will be prompted to log in to GitHub using a URL. | ||
|
||
If you have a private GitHub repository and you would prefer to download it using SSH keys, you can use the following dependency form: | ||
|
||
``` | ||
[email protected]:username/reponame.git | ||
[email protected]:username/reponame.git#<branchname> | ||
[email protected]:username/reponame.git#<tagname> | ||
[email protected]:username/reponame.git#<commit> | ||
``` | ||
|
||
###Other ways to depend on private repositories | ||
Using shorthand GitHub URLs is the easiest and reccomneded method of working with private repositories, however as not all projects are hosted on GitHub, `yotta` supports using git and hg URLs directly as well. | ||
Using shorthand GitHub URLs is the easiest and recommended method of working with private repositories, however as not all projects are hosted on GitHub, `yotta` supports using git and hg URLs directly as well. | ||
|
||
For example, to include a privately hosted git repository from example.com: | ||
|
||
|
@@ -47,13 +62,13 @@ For example, to include a privately hosted git repository from example.com: | |
... | ||
``` | ||
|
||
Git URLs support branch, version and tags specifications: | ||
Git URLs support branch, version, tag and commit specifications: | ||
|
||
``` | ||
git+ssh://example.com/path/to/repo | ||
git+ssh://example.com/path/to/repo#<versionspec, branch or tag> | ||
git+ssh://example.com/path/to/repo#<versionspec, branch, tag or commit> | ||
anything://example.com/path/to/repo.git | ||
anything://example.com/path/to/repo.git#<versionspec, branch or tag> | ||
anything://example.com/path/to/repo.git#<versionspec, branch, tag or commit> | ||
``` | ||
|
||
Currently, mercurial URLs only support a version specification: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.