forked from platformio/platformio-core
Add Infineon XMC dev/platform // Resolve #471
This commit is contained in:
2
docs
2
docs
Submodule docs updated: a77ecd1295...eb2b343ac6
2
examples
2
examples
Submodule examples updated: 8e11abaafc...965ab1cb28
@ -240,6 +240,8 @@ def generate_platform(name, has_extra=False):
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
""")
|
""")
|
||||||
p = PlatformFactory.newPlatform(name)
|
p = PlatformFactory.newPlatform(name)
|
||||||
|
assert p.repository_url.endswith(".git")
|
||||||
|
github_url = p.repository_url[:-4]
|
||||||
|
|
||||||
lines.append(".. _platform_%s:" % p.name)
|
lines.append(".. _platform_%s:" % p.name)
|
||||||
lines.append("")
|
lines.append("")
|
||||||
@ -272,17 +274,13 @@ Examples
|
|||||||
--------
|
--------
|
||||||
|
|
||||||
Examples are listed from `%s development platform repository <%s>`_:
|
Examples are listed from `%s development platform repository <%s>`_:
|
||||||
""" % (p.title,
|
""" % (p.title, campaign_url("%s/tree/master/examples" % github_url)))
|
||||||
campaign_url(
|
|
||||||
"https://github.com/platformio/platform-%s/tree/develop/examples" %
|
|
||||||
p.name)))
|
|
||||||
examples_dir = join(p.get_dir(), "examples")
|
examples_dir = join(p.get_dir(), "examples")
|
||||||
if isdir(examples_dir):
|
if isdir(examples_dir):
|
||||||
for eitem in os.listdir(examples_dir):
|
for eitem in os.listdir(examples_dir):
|
||||||
if not isdir(join(examples_dir, eitem)):
|
if not isdir(join(examples_dir, eitem)):
|
||||||
continue
|
continue
|
||||||
url = ("https://github.com/platformio/platform-%s"
|
url = "%s/tree/master/examples/%s" % (github_url, eitem)
|
||||||
"/tree/develop/examples/%s" % (p.name, eitem))
|
|
||||||
lines.append("* `%s <%s>`_" % (eitem, campaign_url(url)))
|
lines.append("* `%s <%s>`_" % (eitem, campaign_url(url)))
|
||||||
|
|
||||||
#
|
#
|
||||||
@ -300,7 +298,7 @@ Examples are listed from `%s development platform repository <%s>`_:
|
|||||||
Stable and upstream versions
|
Stable and upstream versions
|
||||||
----------------------------
|
----------------------------
|
||||||
|
|
||||||
You can switch between `stable releases <https://github.com/platformio/platform-{name}/releases>`__
|
You can switch between `stable releases <{github_url}/releases>`__
|
||||||
of {title} development platform and the latest upstream version using
|
of {title} development platform and the latest upstream version using
|
||||||
:ref:`projectconf_env_platform` option in :ref:`projectconf` as described below.
|
:ref:`projectconf_env_platform` option in :ref:`projectconf` as described below.
|
||||||
|
|
||||||
@ -325,9 +323,9 @@ Upstream
|
|||||||
.. code-block:: ini
|
.. code-block:: ini
|
||||||
|
|
||||||
[env:upstream_develop]
|
[env:upstream_develop]
|
||||||
platform = https://github.com/platformio/platform-{name}.git
|
platform = {github_url}.git
|
||||||
board = ...
|
board = ...
|
||||||
""".format(name=p.name, title=p.title))
|
""".format(name=p.name, title=p.title, github_url=github_url))
|
||||||
|
|
||||||
#
|
#
|
||||||
# Packages
|
# Packages
|
||||||
@ -460,11 +458,12 @@ Examples
|
|||||||
--------
|
--------
|
||||||
""")
|
""")
|
||||||
for manifest in compatible_platforms:
|
for manifest in compatible_platforms:
|
||||||
lines.append("* `%s for %s <%s>`_" % (
|
p = PlatformFactory.newPlatform(manifest['name'])
|
||||||
data['title'], manifest['title'],
|
lines.append(
|
||||||
campaign_url(
|
"* `%s for %s <%s>`_" %
|
||||||
"https://github.com/platformio/platform-%s/tree/develop/examples"
|
(data['title'], manifest['title'],
|
||||||
% manifest['name'])))
|
campaign_url(
|
||||||
|
"%s/tree/master/examples" % p.repository_url[:-4])))
|
||||||
|
|
||||||
# Platforms
|
# Platforms
|
||||||
lines.append("""
|
lines.append("""
|
||||||
@ -713,8 +712,7 @@ def update_project_examples():
|
|||||||
|
|
||||||
for manifest in PLATFORM_MANIFESTS:
|
for manifest in PLATFORM_MANIFESTS:
|
||||||
p = PlatformFactory.newPlatform(manifest['name'])
|
p = PlatformFactory.newPlatform(manifest['name'])
|
||||||
github_platform_url = (
|
github_url = p.repository_url[:-4]
|
||||||
"https://github.com/platformio/platform-%s" % p.name)
|
|
||||||
|
|
||||||
# Platform README
|
# Platform README
|
||||||
platform_examples_dir = join(p.get_dir(), "examples")
|
platform_examples_dir = join(p.get_dir(), "examples")
|
||||||
@ -723,8 +721,7 @@ def update_project_examples():
|
|||||||
for item in os.listdir(platform_examples_dir):
|
for item in os.listdir(platform_examples_dir):
|
||||||
if not isdir(join(platform_examples_dir, item)):
|
if not isdir(join(platform_examples_dir, item)):
|
||||||
continue
|
continue
|
||||||
url = ("%s/tree/develop/examples/%s" % (github_platform_url,
|
url = "%s/tree/master/examples/%s" % (github_url, item)
|
||||||
item))
|
|
||||||
examples_md_lines.append("* [%s](%s)" % (item, url))
|
examples_md_lines.append("* [%s](%s)" % (item, url))
|
||||||
|
|
||||||
readme_dir = join(project_examples_dir, "platforms", p.name)
|
readme_dir = join(project_examples_dir, "platforms", p.name)
|
||||||
@ -745,14 +742,13 @@ def update_project_examples():
|
|||||||
if framework['name'] not in framework_examples_md_lines:
|
if framework['name'] not in framework_examples_md_lines:
|
||||||
framework_examples_md_lines[framework['name']] = []
|
framework_examples_md_lines[framework['name']] = []
|
||||||
lines = []
|
lines = []
|
||||||
lines.append("- [%s](%s)" % (p.title, github_platform_url))
|
lines.append("- [%s](%s)" % (p.title, github_url))
|
||||||
lines.extend(" %s" % l for l in examples_md_lines)
|
lines.extend(" %s" % l for l in examples_md_lines)
|
||||||
lines.append("")
|
lines.append("")
|
||||||
framework_examples_md_lines[framework['name']].extend(lines)
|
framework_examples_md_lines[framework['name']].extend(lines)
|
||||||
|
|
||||||
# Root README
|
# Root README
|
||||||
url = "https://github.com/platformio/platform-%s/tree/develop/examples" % p.name
|
line = "* [%s](%s)" % (p.title, "%s/tree/master/examples" % github_url)
|
||||||
line = "* [%s](%s)" % (p.title, url)
|
|
||||||
if p.is_embedded():
|
if p.is_embedded():
|
||||||
embedded.append(line)
|
embedded.append(line)
|
||||||
else:
|
else:
|
||||||
|
Reference in New Issue
Block a user