{% set app_dir = '/opt/{0}'.format(salt.pillar.get('django:app_name')) %}

build_static_assets_for_odlvideo:
  cmd.script:
    - name: {{ app_dir }}/webpack_if_prod.sh
    - cwd: {{ app_dir }}
    - env:
        - NODE_ENV: production
    - user: deploy

generate_deploy_hash_for_odlvideo:
  cmd.run:
    - name: 'git log --pretty=format:%H -n 1 > static/hash.txt'
    - cwd: {{ app_dir }}
    - user: deploy

signal_odlvideo_deploy_complete:
  file.touch:
    - name: {{ app_dir }}/deploy_complete.txt

{% set app_dir = '/opt/{0}'.format(salt.pillar.get('django:app_name')) %}

build_static_assets_for_odlvideo:
  cmd.script:
    - name: {{ app_dir }}/webpack_if_prod.sh
    - cwd: {{ app_dir }}
    - env:
        - NODE_ENV: production
    - user: deploy

generate_deploy_hash_for_odlvideo:
  cmd.run:
    - name: 'git log --pretty=format:%H -n 1 > static/hash.txt'
    - cwd: {{ app_dir }}
    - user: deploy

signal_odlvideo_deploy_complete:
  file.touch:
    - name: {{ app_dir }}/deploy_complete.txt
    - order: last

Set deploy complete signal to execute last
Set deploy complete signal to execute last

mitodl/salt-ops,mitodl/salt-ops