You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add documentation for publishing local/new repositories #362
Add documentation regarding the specific Python, Git and Mercurial versions that mbed CLI supports #376
Copy file name to clipboardExpand all lines: README.md
+21-3Lines changed: 21 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -54,11 +54,11 @@ mbed CLI is supported on Windows, Linux and Mac OS X. We're keen to learn about
54
54
55
55
### Requirements
56
56
57
-
***Python** - mbed CLI is a Python script, so you'll need Python in order to use it. mbed CLI was tested with version 2.7.9 of Python. You can download that or a newer version [here](https://www.python.org/downloads/).
57
+
***Python** - mbed CLI is a Python script, so you'll need Python in order to use it. mbed CLI was tested with [version 2.7.11 of Python](https://www.python.org/downloads/release/python-2711/) and is not compatible with Python 3.
58
58
59
59
***Git and Mercurial** - mbed CLI supports both Git and Mercurial repositories, so you'll need to install both:
60
-
*[Git](https://git-scm.com/).
61
-
*[Mercurial](https://www.mercurial-scm.org/).
60
+
*[Git](https://git-scm.com/) - version 1.9.5 or later
61
+
*[Mercurial](https://www.mercurial-scm.org/) - version 2.2.2 or later
62
62
63
63
<spanclass="tips">**Note:** The directories of Git and Mercurial executables (`git` and `hg`) need to be in your system's PATH.</span>
Let's assume that you make changes to `iot-client`. `publish` detects the change on the leaf `iot-client` dependency and asks you to commit it. Then it detects that `my-libs` depends on `iot-client`, updates the `my-libs` dependency on `iot-client` to its latest version (by updating the `iot-client.lib` file) and asks you to commit it. This propagates up to `my-libs` and finally to your program `my-mbed-os-example`.
661
661
662
+
## Publishing a local program or library
663
+
664
+
When you create a new (local) source-control managed program or library, its revision history exists only locally; the repository is not associated with the remote one. To publish the local repository without losing its revision history, please follow these steps:
665
+
666
+
1. Create a new empty repository on the remote site. This can be based on a public repository hosting service (GitHub, Bitbucket, mbed.org), your own service or even a different location on your system.
667
+
2. Copy the URL/location of the new repository in your clipboard and open command line in the local repository directory (for example change directory to `mbed-os-example/local-lib`).
668
+
3. To associate the local repository:
669
+
* For Git - run `git remote add origin <url-or-paht-to-your-remote-repo>`.
670
+
* For Mercurial - edit .hg/hgrc and add (or replace if exists):
671
+
672
+
```
673
+
[paths]
674
+
default = <url-or-paht-to-your-remote-repo>
675
+
```
676
+
4. Run `mbed publish` to publish your changes.
677
+
678
+
In scanario with nested local repositories, start with the leaf repositories first.
679
+
662
680
### Forking workflow
663
681
664
682
Git enables asymmetric workflow where the publish/push repository might be different than the original ("origin") one. This allows new revisions to land in a fork repository, while maintaining an association with the original repository.
"%s \"%s\" in \"%s\" is a local repository.\nPlease associate it with a remote repository URL before attempting to publish.\n"
1779
-
"Read more about %s repositories here:\nhttp://developer.mbed.org/handbook/how-to-publish-with-%s/"% ("Program"iftopelse"Library", repo.name, repo.path, repo.scm.name, repo.scm.name), 1)
1779
+
"Read more about publishing local repositories here:\nhttps://github.com/ARMmbed/mbed-cli/#publishing-local-program-or-library"% ("Program"iftopelse"Library", repo.name, repo.path, repo.scm.name), 1)
0 commit comments