diff --git a/defaults/main.yml b/defaults/main.yml index 77e620a..756ec58 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -262,4 +262,12 @@ galaxy_uwsgi_config_default: # Options include: client / client-production / client-production-maps (default). Set to null to invoke each step of the # build separately, but this is not guaranteed to work for all version of Galaxy - using `make` is the safer choice. galaxy_client_make_target: client-production-maps +galaxy_client_build_steps: + default: + - client + - plugins + 19.09: + - fonts + - stageLibs + - plugins diff --git a/tasks/_inc_client_build_steps.yml b/tasks/_inc_client_build_steps.yml index c64f309..6367aef 100644 --- a/tasks/_inc_client_build_steps.yml +++ b/tasks/_inc_client_build_steps.yml @@ -8,14 +8,22 @@ PATH: "{{ galaxy_venv_dir }}/bin:{{ ansible_env.PATH }}" VIRTUAL_ENV: "{{ galaxy_venv_dir }}" +- name: Ensure Galaxy version is set + include_tasks: _inc_galaxy_version.yml + when: __galaxy_major_version is undefined + +- name: Ensure deconstructed build is supported + assert: + that: + - __galaxy_major_version is version('19.09', '>=') + success_msg: "Deconstructed client build is supported" + fail_msg: "Deconstructed client build is not supported for Galaxy version {{ __galaxy_major_version }}, please set 'galaxy_client_make_target'" + - name: Run gulp command: yarn run gulp {{ item }} args: chdir: "{{ galaxy_server_dir }}/client" - with_items: - - fonts - - stageLibs - - plugins + with_items: "{{ galaxy_client_build_steps[__galaxy_major_version] | default(galaxy_client_build_steps.default) }}" environment: PATH: "{{ galaxy_server_dir }}/client/node_modules/.bin:{{ galaxy_venv_dir }}/bin:{{ ansible_env.PATH }}" VIRTUAL_ENV: "{{ galaxy_venv_dir }}"