Browse Source

Update scripts composer para que tomen parámetros

Espinoza Guillermo 6 years ago
parent
commit
98271fddd1
2 changed files with 22 additions and 2 deletions
  1. 11 1
      bin/composer-install.sh
  2. 11 1
      bin/composer-update.sh

+ 11 - 1
bin/composer-install.sh

@@ -1,8 +1,18 @@
 #!/bin/bash
+
+start=`date +%s`
+
 chmod 0400 keys/*
 eval $(ssh-agent)
 ssh-add keys/bitbucket.id_rsa
-composer install --no-progress -n
+
+command="composer install --no-progress -n $@"
+echo -e "Command: \e[42m$command\e[0m"
+$command
 
 kill $SSH_AGENT_PID
 unset SSH_AGENT_PID
+
+end=`date +%s`
+runtime=$((end-start))
+echo -e "\e[42mExecution time: $runtime s\e[0m"

+ 11 - 1
bin/composer-update.sh

@@ -1,8 +1,18 @@
 #!/bin/bash
+
+start=`date +%s`
+
 chmod 0400 keys/*
 eval $(ssh-agent)
 ssh-add keys/bitbucket.id_rsa
-composer update --prefer-dist --no-plugins --no-autoloader --no-scripts --no-progress --no-suggest --with-dependencies --ignore-platform-reqs --prefer-lowest -n
+
+command="composer update --prefer-dist --no-plugins --no-autoloader --no-scripts --no-progress --no-suggest --with-dependencies --ignore-platform-reqs --prefer-lowest -n $@"
+echo -e "Command: \e[42m$command\e[0m"
+$command
 
 kill $SSH_AGENT_PID
 unset SSH_AGENT_PID
+
+end=`date +%s`
+runtime=$((end-start))
+echo -e "\e[42mExecution time: $runtime s\e[0m"