mirror of
https://github.com/frappe/frappe_docker.git
synced 2026-06-17 13:55:08 +00:00
fix(easy-docker): align app branch defaults with catalog
This commit is contained in:
parent
8e56cbb1f9
commit
cbe5c7042c
3 changed files with 22 additions and 17 deletions
|
|
@ -1,7 +1,7 @@
|
|||
# id label repo default_branch branches_csv
|
||||
erpnext ERPNext https://github.com/frappe/erpnext develop version-15,version-16,develop
|
||||
crm CRM https://github.com/frappe/crm develop develop,version-16,version-15
|
||||
erpnext ERPNext https://github.com/frappe/erpnext develop develop,version-15,version-16
|
||||
crm CRM https://github.com/frappe/crm develop develop,main
|
||||
hrms HRMS https://github.com/frappe/hrms develop develop,version-16,version-15
|
||||
lms LMS https://github.com/frappe/lms develop develop,version-16,version-15
|
||||
helpdesk Helpdesk https://github.com/frappe/helpdesk develop develop,version-16,version-15
|
||||
drive Drive https://github.com/frappe/drive develop develop,version-16,version-15
|
||||
lms LMS https://github.com/frappe/lms develop develop,main
|
||||
helpdesk Helpdesk https://github.com/frappe/helpdesk develop develop,main
|
||||
drive Drive https://github.com/frappe/drive develop develop
|
||||
|
|
|
|||
|
|
|
@ -689,6 +689,7 @@ build_stack_apps_json_content_from_metadata_apps() {
|
|||
local custom_apps_lines=""
|
||||
local predefined_branch=""
|
||||
local preset_branch=""
|
||||
local catalog_default_branch=""
|
||||
local app=""
|
||||
local line=""
|
||||
local repo=""
|
||||
|
|
@ -721,8 +722,14 @@ build_stack_apps_json_content_from_metadata_apps() {
|
|||
fi
|
||||
|
||||
predefined_branch="$(get_metadata_apps_predefined_branch_for_id "${metadata_path}" "${app}" || true)"
|
||||
|
||||
if [ -z "${predefined_branch}" ]; then
|
||||
predefined_branch="${preset_branch}"
|
||||
catalog_default_branch="$(get_predefined_app_default_branch_by_id "${app}" || true)"
|
||||
if [ -n "${catalog_default_branch}" ]; then
|
||||
predefined_branch="${catalog_default_branch}"
|
||||
else
|
||||
predefined_branch="${preset_branch}"
|
||||
fi
|
||||
fi
|
||||
|
||||
escaped_url="$(json_escape_string "${url}")"
|
||||
|
|
|
|||
20
scripts/easy-docker/lib/app/wizard/env/apps.sh
vendored
20
scripts/easy-docker/lib/app/wizard/env/apps.sh
vendored
|
|
@ -174,7 +174,6 @@ choose_predefined_app_branch() {
|
|||
local status_text=""
|
||||
local selection=""
|
||||
local default_hint=""
|
||||
local preferred_found=0
|
||||
local -a branch_options=()
|
||||
|
||||
if ! get_predefined_app_branch_lines_by_id branches_lines "${app_id}"; then
|
||||
|
|
@ -186,20 +185,11 @@ choose_predefined_app_branch() {
|
|||
if [ -z "${branch}" ]; then
|
||||
continue
|
||||
fi
|
||||
if [ "${branch}" = "${preferred_branch}" ]; then
|
||||
branch_options=("${branch}" "${branch_options[@]}")
|
||||
preferred_found=1
|
||||
else
|
||||
branch_options+=("${branch}")
|
||||
fi
|
||||
branch_options+=("${branch}")
|
||||
done <<EOF
|
||||
${branches_lines}
|
||||
EOF
|
||||
|
||||
if [ -n "${preferred_branch}" ] && [ "${preferred_found}" -eq 0 ]; then
|
||||
branch_options=("${preferred_branch}" "${branch_options[@]}")
|
||||
fi
|
||||
|
||||
if [ "${#branch_options[@]}" -eq 0 ]; then
|
||||
show_warning_and_wait "No branches available for ${app_label} (${repo_url})." 3
|
||||
return 1
|
||||
|
|
@ -254,6 +244,7 @@ prompt_custom_modular_apps_data() {
|
|||
local predefined_repo_url=""
|
||||
local selected_branch=""
|
||||
local preferred_branch=""
|
||||
local available_branch_lines=""
|
||||
local existing_branch_lines=""
|
||||
local selected_branch_lines=""
|
||||
local selected_app_count=0
|
||||
|
|
@ -371,6 +362,13 @@ EOF
|
|||
preferred_branch="$(get_default_frappe_branch)"
|
||||
fi
|
||||
|
||||
available_branch_lines=""
|
||||
if get_predefined_app_branch_lines_by_id available_branch_lines "${predefined_app_id}"; then
|
||||
if [ -n "${preferred_branch}" ] && ! lines_contains_line "${available_branch_lines}" "${preferred_branch}"; then
|
||||
preferred_branch="$(get_predefined_app_default_branch_by_id "${predefined_app_id}" || true)"
|
||||
fi
|
||||
fi
|
||||
|
||||
if choose_predefined_app_branch selected_branch "${stack_dir}" "${predefined_app_id}" "${predefined_app_label}" "${predefined_repo_url}" "${preferred_branch}"; then
|
||||
:
|
||||
else
|
||||
|
|
|
|||
Loading…
Reference in a new issue