Skip to content

Commit

Permalink
Merge pull request #94 from galaxyproject/client-build-deconstructed-…
Browse files Browse the repository at this point in the history
…20.01

Support deconstructed client build on > 19.09
  • Loading branch information
natefoo committed Oct 29, 2019
2 parents 4bb07ea + a659e50 commit 6fcacfc
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 4 deletions.
8 changes: 8 additions & 0 deletions defaults/main.yml
Expand Up @@ -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

16 changes: 12 additions & 4 deletions tasks/_inc_client_build_steps.yml
Expand Up @@ -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 }}"
Expand Down

0 comments on commit 6fcacfc

Please sign in to comment.