mirror of
https://github.com/platformio/platformio-core.git
synced 2025-07-29 17:47:14 +02:00
Improved detection of a package type from the tarball archive // Resolve #3828
This commit is contained in:
@ -32,6 +32,7 @@ PlatformIO Core 5
|
||||
|
||||
- Added support for `symbolic links <https://docs.platformio.org/en/latest/core/userguide/pkg/cmd_install.html#local-folder>`__ allowing pointing the local source folder to the Package Manager (`issue #3348 <https://github.com/platformio/platformio-core/issues/3348>`_)
|
||||
- Automatically install dependencies of the local (private) project libraries (`issue #2910 <https://github.com/platformio/platformio-core/issues/2910>`_)
|
||||
- Improved detection of a package type from the tarball archive (`issue #3828 <https://github.com/platformio/platformio-core/issues/3828>`_)
|
||||
- Ignore files according to the patterns declared in ".gitignore" when using the `pio package pack <https://docs.platformio.org/en/latest/core/userguide/pkg/cmd_pack.html>`__ command (`issue #4188 <https://github.com/platformio/platformio-core/issues/4188>`_)
|
||||
- Dropped automatic updates of global libraries and development platforms (`issue #4179 <https://github.com/platformio/platformio-core/issues/4179>`_)
|
||||
- Dropped support for the "pythonPackages" field in "platform.json" manifest in favor of `Extra Python Dependencies <https://docs.platformio.org/en/latest/scripting/examples/extra_python_packages.html>`__
|
||||
|
2
docs
2
docs
Submodule docs updated: f834c85d59...f543ff06f0
@ -52,6 +52,11 @@ def validate_datetime(ctx, param, value): # pylint: disable=unused-argument
|
||||
help="PIO Account username (can be organization username). "
|
||||
"Default is set to a username of the authorized PIO Account",
|
||||
)
|
||||
@click.option(
|
||||
"--type", "type_",
|
||||
type=click.Choice(list(PackageType.items().values())),
|
||||
help="Custom package type",
|
||||
)
|
||||
@click.option(
|
||||
"--released-at",
|
||||
callback=validate_datetime,
|
||||
@ -69,13 +74,13 @@ def validate_datetime(ctx, param, value): # pylint: disable=unused-argument
|
||||
help="Do not show interactive prompt",
|
||||
)
|
||||
def package_publish_cmd( # pylint: disable=too-many-arguments, too-many-locals
|
||||
package, owner, released_at, private, notify, non_interactive
|
||||
package, owner, type_, released_at, private, notify, non_interactive
|
||||
):
|
||||
click.secho("Preparing a package...", fg="cyan")
|
||||
owner = owner or AccountClient().get_logged_username()
|
||||
do_not_pack = not os.path.isdir(package) and isinstance(
|
||||
FileUnpacker.new_archiver(package), TARArchiver
|
||||
)
|
||||
) and PackageType.from_archive(package)
|
||||
archive_path = None
|
||||
with tempfile.TemporaryDirectory() as tmp_dir: # pylint: disable=no-member
|
||||
# publish .tar.gz instantly without repacking
|
||||
@ -86,7 +91,7 @@ def package_publish_cmd( # pylint: disable=too-many-arguments, too-many-locals
|
||||
p = PackagePacker(package)
|
||||
archive_path = p.pack()
|
||||
|
||||
type_ = PackageType.from_archive(archive_path)
|
||||
type_ = type_ or PackageType.from_archive(archive_path)
|
||||
manifest = ManifestSchema().load_manifest(
|
||||
ManifestParserFactory.new_from_archive(archive_path).as_dict()
|
||||
)
|
||||
|
@ -275,9 +275,7 @@ def test_remove_project_unused_libdeps(
|
||||
|
||||
# add new deps
|
||||
lib_deps = config.get("env:baremetal", "lib_deps")
|
||||
config.set(
|
||||
"env:baremetal", "lib_deps", lib_deps + ["bblanchon/ArduinoJson@^5"]
|
||||
)
|
||||
config.set("env:baremetal", "lib_deps", lib_deps + ["bblanchon/ArduinoJson@^5"])
|
||||
config.save()
|
||||
result = clirunner.invoke(
|
||||
package_install_cmd,
|
||||
|
Reference in New Issue
Block a user