-
Notifications
You must be signed in to change notification settings - Fork 3.3k
[App Service] Add az webapp up flag for HTML static sites #11719
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
Changes from all commits
fd4a949
fdcfb29
0fbb97f
11f0eee
2bd03e8
a1ade70
3328220
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2967,16 +2967,16 @@ def get_history_triggered_webjob(cmd, resource_group_name, name, webjob_name, sl | |
|
|
||
|
|
||
| def webapp_up(cmd, name, resource_group_name=None, plan=None, location=None, sku=None, dryrun=False, logs=False, # pylint: disable=too-many-statements, | ||
| launch_browser=False): | ||
| launch_browser=False, html=False): | ||
| import os | ||
| src_dir = os.getcwd() | ||
| _src_path_escaped = "{}".format(src_dir.replace(os.sep, os.sep + os.sep)) | ||
| client = web_client_factory(cmd.cli_ctx) | ||
| user = get_profile_username() | ||
| _create_new_rg = False | ||
| _create_new_app = does_app_already_exist(cmd, name) | ||
| os_name = detect_os_form_src(src_dir) | ||
| lang_details = get_lang_from_content(src_dir) | ||
| os_name = detect_os_form_src(src_dir, html) | ||
| lang_details = get_lang_from_content(src_dir, html) | ||
| language = lang_details.get('language') | ||
|
|
||
| # detect the version | ||
|
|
@@ -3023,7 +3023,7 @@ def webapp_up(cmd, name, resource_group_name=None, plan=None, location=None, sku | |
| site_config = client.web_apps.get_configuration(rg_name, name) | ||
| else: # need to create new app, check if we need to use default RG or use user entered values | ||
| logger.warning("webapp %s doesn't exist", name) | ||
| sku = get_sku_to_use(src_dir, sku) | ||
| sku = get_sku_to_use(src_dir, html, sku) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. can we avoid using positional arguments for each function?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we need to pass these in case of the flag being set
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I know. I will prefer something like get_sku_to_use(src_dir=src_dir, html=html, sku=sku) to avoid positional arguments. in this way it will not cause error when argument positions change. |
||
| loc = set_location(cmd, sku, location) | ||
| rg_name = get_rg_to_use(cmd, user, loc, os_name, resource_group_name) | ||
| _is_linux = os_name.lower() == 'linux' | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.