|
@ -287,7 +287,7 @@ def new_publish(args, publish_type, vehicle, language, version): |
|
|
""" Save file (Internal/Global) """ |
|
|
""" Save file (Internal/Global) """ |
|
|
with open(file_name, 'w') as outfile: |
|
|
with open(file_name, 'w') as outfile: |
|
|
outfile.write(json.dumps(json_file)) |
|
|
outfile.write(json.dumps(json_file)) |
|
|
# get_step_total_count(file_name) |
|
|
get_step_total_count(file_name) |
|
|
|
|
|
|
|
|
""" Remove previous internal publish file """ |
|
|
""" Remove previous internal publish file """ |
|
|
if publish_type.lower() == 'internal': |
|
|
if publish_type.lower() == 'internal': |
|
@ -311,9 +311,9 @@ def new_publish(args, publish_type, vehicle, language, version): |
|
|
if str(version) == '1.00': |
|
|
if str(version) == '1.00': |
|
|
with open(full_update_file_name, 'w') as outfile: |
|
|
with open(full_update_file_name, 'w') as outfile: |
|
|
outfile.write(json.dumps(json_file)) |
|
|
outfile.write(json.dumps(json_file)) |
|
|
with open(new_full_update_file_name, 'w') as outfile: |
|
|
# with open(new_full_update_file_name, 'w') as outfile: |
|
|
outfile.write(json.dumps(json_file)) |
|
|
# outfile.write(json.dumps(json_file)) |
|
|
# get_step_total_count(full_update_file_name) |
|
|
get_step_total_count(full_update_file_name) |
|
|
|
|
|
|
|
|
else: |
|
|
else: |
|
|
pub_ver = frappe.db.sql(''' SELECT vehicle,`language`,format(version,2) as version,publish_type FROM tabPublish where vehicle = '{}' |
|
|
pub_ver = frappe.db.sql(''' SELECT vehicle,`language`,format(version,2) as version,publish_type FROM tabPublish where vehicle = '{}' |
|
@ -326,6 +326,7 @@ def new_publish(args, publish_type, vehicle, language, version): |
|
|
|
|
|
|
|
|
file_flag, final_update_file = merge_json_files( |
|
|
file_flag, final_update_file = merge_json_files( |
|
|
prev_full_update_file, file_name, full_update_file_name) |
|
|
prev_full_update_file, file_name, full_update_file_name) |
|
|
|
|
|
get_step_total_count(final_update_file) |
|
|
if file_flag: |
|
|
if file_flag: |
|
|
return True, file_name.split('public')[1] |
|
|
return True, file_name.split('public')[1] |
|
|
else: |
|
|
else: |
|
|