Skip to content

Commit

Permalink
Add aliases for 5.6 and 7.0, Update Vagrantfile to require recent Vag…
Browse files Browse the repository at this point in the history
…rant
  • Loading branch information
svpernova09 committed Jun 21, 2019
1 parent 2b17fbd commit afb74d5
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 14 deletions.
2 changes: 1 addition & 1 deletion Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ aliasesPath = confDir + "/aliases"

require File.expand_path(File.dirname(__FILE__) + '/scripts/homestead.rb')

Vagrant.require_version '>= 2.1.0'
Vagrant.require_version '>= 2.2.4'

Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
if File.exist? aliasesPath then
Expand Down
25 changes: 13 additions & 12 deletions resources/aliases
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ alias h='cd ~'
alias c='clear'
alias art=artisan

alias codecept='vendor/bin/codecept'
alias phpspec='vendor/bin/phpspec'
alias phpunit='vendor/bin/phpunit'
alias serve=serve-laravel
Expand Down Expand Up @@ -38,6 +39,18 @@ function dusk() {
php artisan dusk "$@"
}

function php56() {
sudo update-alternatives --set php /usr/bin/php5.6
sudo update-alternatives --set php-config /usr/bin/php-config5.6
sudo update-alternatives --set phpize /usr/bin/phpize5.6
}

function php70() {
sudo update-alternatives --set php /usr/bin/php7.0
sudo update-alternatives --set php-config /usr/bin/php-config7.0
sudo update-alternatives --set phpize /usr/bin/phpize7.0
}

function php71() {
sudo update-alternatives --set php /usr/bin/php7.1
sudo update-alternatives --set php-config /usr/bin/php-config7.1
Expand Down Expand Up @@ -264,15 +277,3 @@ function xphp() {

if ! $XDEBUG_ENABLED; then xoff; fi
}

function update-socket-wrench() {
cd /var/www/socket-wrench
git pull origin release
composer install
php artisan migrate --force
}

function seed-socket-wrench() {
cd /var/www/socket-wrench
php artisan db:seed
}
2 changes: 1 addition & 1 deletion resources/localized/Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ aliasesPath = "aliases"

require File.expand_path(confDir + '/scripts/homestead.rb')

Vagrant.require_version '>= 1.9.0'
Vagrant.require_version '>= 2.2.4'

Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
if File.exist? aliasesPath then
Expand Down
13 changes: 13 additions & 0 deletions resources/localized/aliases
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ alias h='cd ~'
alias c='clear'
alias art=artisan

alias codecept='vendor/bin/codecept'
alias phpspec='vendor/bin/phpspec'
alias phpunit='vendor/bin/phpunit'
alias serve=serve-laravel
Expand All @@ -26,6 +27,18 @@ function dusk() {
php artisan dusk "$@"
}

function php56() {
sudo update-alternatives --set php /usr/bin/php5.6
sudo update-alternatives --set php-config /usr/bin/php-config5.6
sudo update-alternatives --set phpize /usr/bin/phpize5.6
}

function php70() {
sudo update-alternatives --set php /usr/bin/php7.0
sudo update-alternatives --set php-config /usr/bin/php-config7.0
sudo update-alternatives --set phpize /usr/bin/phpize7.0
}

function php71() {
sudo update-alternatives --set php /usr/bin/php7.1
sudo update-alternatives --set php-config /usr/bin/php-config7.1
Expand Down

0 comments on commit afb74d5

Please sign in to comment.