Merge pull request #143 from Mario-F/master
Changed method to detect if composer self-update is needed.
This commit is contained in:
commit
0176070904
@ -32,7 +32,7 @@ install-composer:
|
|||||||
- require:
|
- require:
|
||||||
- file: get-composer
|
- file: get-composer
|
||||||
|
|
||||||
# Get COMPOSER_DEV_WARNING_TIME from the installed composer, and if that time has passed
|
# Get composer version date and check if older than 60day (defaultvalue of COMPOSER_DEV_WARNING_TIME)
|
||||||
# then it's time to run `composer selfupdate`
|
# then it's time to run `composer selfupdate`
|
||||||
#
|
#
|
||||||
# It would be nice if composer had a command line switch to get this, but it doesn't,
|
# It would be nice if composer had a command line switch to get this, but it doesn't,
|
||||||
@ -41,7 +41,7 @@ install-composer:
|
|||||||
update-composer:
|
update-composer:
|
||||||
cmd.run:
|
cmd.run:
|
||||||
- name: "{{ install_file }} selfupdate"
|
- name: "{{ install_file }} selfupdate"
|
||||||
- unless: test $(grep --text COMPOSER_DEV_WARNING_TIME {{ install_file }} | egrep '^\s*define' | sed -e 's,[^[:digit:]],,g') \> $(php -r 'echo time();')
|
- unless: test $(date -d "60 days $({{ install_file }} --version | cut -d ' ' -f 4,5)" "+%s") \> $(date "+%s")
|
||||||
- cwd: {{ php.local_bin }}
|
- cwd: {{ php.local_bin }}
|
||||||
- env:
|
- env:
|
||||||
- HOME: {{ salt_user_home }}
|
- HOME: {{ salt_user_home }}
|
||||||
|
@ -32,7 +32,7 @@ install-composer:
|
|||||||
- require:
|
- require:
|
||||||
- file: get-composer
|
- file: get-composer
|
||||||
|
|
||||||
# Get COMPOSER_DEV_WARNING_TIME from the installed composer, and if that time has passed
|
# Get composer version date and check if older than 60day (defaultvalue of COMPOSER_DEV_WARNING_TIME)
|
||||||
# then it's time to run `composer selfupdate`
|
# then it's time to run `composer selfupdate`
|
||||||
#
|
#
|
||||||
# It would be nice if composer had a command line switch to get this, but it doesn't,
|
# It would be nice if composer had a command line switch to get this, but it doesn't,
|
||||||
@ -41,7 +41,7 @@ install-composer:
|
|||||||
update-composer:
|
update-composer:
|
||||||
cmd.run:
|
cmd.run:
|
||||||
- name: "{{ install_file }} selfupdate"
|
- name: "{{ install_file }} selfupdate"
|
||||||
- unless: test $(grep --text COMPOSER_DEV_WARNING_TIME {{ install_file }} | egrep '^\s*define' | sed -e 's,[^[:digit:]],,g') \> $(php -r 'echo time();')
|
- unless: test $(date -d "60 days $({{ install_file }} --version | cut -d ' ' -f 4,5)" "+%s") \> $(date "+%s")
|
||||||
- cwd: {{ php.lookup.pkgs.local_bin }}
|
- cwd: {{ php.lookup.pkgs.local_bin }}
|
||||||
- env:
|
- env:
|
||||||
- HOME: {{ salt_user_home }}
|
- HOME: {{ salt_user_home }}
|
||||||
|
Loading…
Reference in New Issue
Block a user