Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixing deploy->deployers naming arg and folder #13740

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions conan/cli/commands/graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ def graph_info(conan_api, parser, subparser, *args):
help="Show only the specified fields")
subparser.add_argument("--package-filter", action="append",
help='Print information only for packages that match the patterns')
subparser.add_argument("--deploy", action="append",
subparser.add_argument("-d", "--deployer", action="append",
help='Deploy using the provided deployer to the output folder')
subparser.add_argument("--build-require", action='store_true', default=False,
help='Whether the provided reference is a build-require')
Expand Down Expand Up @@ -165,9 +165,9 @@ def graph_info(conan_api, parser, subparser, *args):
lockfile = conan_api.lockfile.update_lockfile(lockfile, deps_graph, args.lockfile_packages,
clean=args.lockfile_clean)
conan_api.lockfile.save_lockfile(lockfile, args.lockfile_out, os.getcwd())
if args.deploy:
if args.deployer:
base_folder = os.getcwd()
do_deploys(conan_api, deps_graph, args.deploy, base_folder)
do_deploys(conan_api, deps_graph, args.deployer, base_folder)

return {"graph": deps_graph,
"field_filter": args.filter,
Expand Down
4 changes: 2 additions & 2 deletions conan/cli/commands/install.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def install(conan_api, parser, *args):
help='Generators to use')
parser.add_argument("-of", "--output-folder",
help='The root output folder for generated and build files')
parser.add_argument("--deploy", action="append",
parser.add_argument("-d", "--deployer", action="append",
help='Deploy using the provided deployer to the output folder')
parser.add_argument("--build-require", action='store_true', default=False,
help='Whether the provided reference is a build-require')
Expand Down Expand Up @@ -86,7 +86,7 @@ def install(conan_api, parser, *args):
generators=args.generator,
output_folder=output_folder,
source_folder=source_folder,
deploy=args.deploy
deploy=args.deployer
)

out.success("Install finished successfully")
Expand Down
15 changes: 8 additions & 7 deletions conans/client/cache/cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
from jinja2 import FileSystemLoader, Environment

from conan import conan_version
from conan.api.output import ConanOutput
from conan.internal.cache.cache import DataCache, RecipeLayout, PackageLayout
from conans.client.cache.editable import EditablePackages
from conans.client.cache.remote_registry import RemoteRegistry
Expand All @@ -27,8 +28,6 @@
EXTENSIONS_FOLDER = "extensions"
HOOKS_EXTENSION_FOLDER = "hooks"
PLUGINS_FOLDER = "plugins"
DEPLOYERS_EXTENSION_FOLDER = "deploy"
CUSTOM_COMMANDS_FOLDER = "commands"


# TODO: Rename this to ClientHome
Expand Down Expand Up @@ -186,7 +185,7 @@ def settings_path(self):

@property
def custom_commands_path(self):
return os.path.join(self.cache_folder, EXTENSIONS_FOLDER, CUSTOM_COMMANDS_FOLDER)
return os.path.join(self.cache_folder, EXTENSIONS_FOLDER, "commands")

@property
def custom_generators_path(self):
Expand All @@ -203,14 +202,16 @@ def default_profile_path(self):

@property
def hooks_path(self):
"""
:return: Hooks folder in client cache
"""
return os.path.join(self.cache_folder, EXTENSIONS_FOLDER, HOOKS_EXTENSION_FOLDER)

@property
def deployers_path(self):
return os.path.join(self.cache_folder, EXTENSIONS_FOLDER, DEPLOYERS_EXTENSION_FOLDER)
deploy = os.path.join(self.cache_folder, EXTENSIONS_FOLDER, "deploy")
if os.path.exists(deploy):
ConanOutput().warning("Use 'deployers' cache folder for deployers instead of 'deploy'",
warn_tag="deprecated")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yay for another tag usage!

return deploy
return os.path.join(self.cache_folder, EXTENSIONS_FOLDER, "deployers")

@property
def settings(self):
Expand Down