Browse Source

composer update: date works differently on FreeBSD

tags/v0.34.0
Alexander Weidinger 6 years ago
parent
commit
4300840c02
2 changed files with 8 additions and 0 deletions
  1. +4
    -0
      php/composer.sls
  2. +4
    -0
      php/ng/composer.sls

+ 4
- 0
php/composer.sls View File

update-composer: update-composer:
cmd.run: cmd.run:
- name: "{{ install_file }} selfupdate" - name: "{{ install_file }} selfupdate"
{% if grains['os_family'] == 'FreeBSD' %}
- unless: test $(date -v+60d -j -f "%Y-%m-%d %H:%M:%S" "$({{ install_file }} --version | cut -d ' ' -f 4,5)" "+%s") -gt $(date "+%s")
{% else %}
- unless: test $(date -d "60 days $({{ install_file }} --version | cut -d ' ' -f 4,5)" "+%s") -gt $(date "+%s") - unless: test $(date -d "60 days $({{ install_file }} --version | cut -d ' ' -f 4,5)" "+%s") -gt $(date "+%s")
{% endif %}
- cwd: {{ php.local_bin }} - cwd: {{ php.local_bin }}
- env: - env:
- HOME: {{ salt_user_home }} - HOME: {{ salt_user_home }}

+ 4
- 0
php/ng/composer.sls View File

update-composer: update-composer:
cmd.run: cmd.run:
- name: "{{ install_file }} selfupdate" - name: "{{ install_file }} selfupdate"
{% if grains['os_family'] == 'FreeBSD' %}
- unless: test $(date -v+60d -j -f "%Y-%m-%d %H:%M:%S" "$({{ install_file }} --version | cut -d ' ' -f 4,5)" "+%s") -gt $(date "+%s")
{% else %}
- unless: test $(date -d "60 days $({{ install_file }} --version | cut -d ' ' -f 4,5)" "+%s") -gt $(date "+%s") - unless: test $(date -d "60 days $({{ install_file }} --version | cut -d ' ' -f 4,5)" "+%s") -gt $(date "+%s")
{% endif %}
- cwd: {{ php.lookup.pkgs.local_bin }} - cwd: {{ php.lookup.pkgs.local_bin }}
- env: - env:
- HOME: {{ salt_user_home }} - HOME: {{ salt_user_home }}

Loading…
Cancel
Save