-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
149 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,3 +10,5 @@ composer.phar | |
_ide_helper.php | ||
/public/Documentation | ||
deploy.php | ||
Homestead.yaml | ||
.vagrant |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
require 'json' | ||
require 'yaml' | ||
|
||
VAGRANTFILE_API_VERSION ||= "2" | ||
confDir = $confDir ||= File.expand_path("vendor/laravel/homestead", File.dirname(__FILE__)) | ||
|
||
homesteadYamlPath = "Homestead.yaml" | ||
homesteadJsonPath = "Homestead.json" | ||
afterScriptPath = "after.sh" | ||
aliasesPath = "aliases" | ||
|
||
require File.expand_path(confDir + '/scripts/homestead.rb') | ||
|
||
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | ||
if File.exists? aliasesPath then | ||
config.vm.provision "file", source: aliasesPath, destination: "~/.bash_aliases" | ||
end | ||
|
||
if File.exists? homesteadYamlPath then | ||
Homestead.configure(config, YAML::load(File.read(homesteadYamlPath))) | ||
elsif File.exists? homesteadJsonPath then | ||
Homestead.configure(config, JSON.parse(File.read(homesteadJsonPath))) | ||
end | ||
|
||
if File.exists? afterScriptPath then | ||
config.vm.provision "shell", path: afterScriptPath | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/bin/sh | ||
|
||
# If you would like to do some extra provisioning you may | ||
# add any commands you wish to this file and they will | ||
# be run after the Homestead machine is provisioned. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
alias ..="cd .." | ||
alias ...="cd ../.." | ||
|
||
alias h='cd ~' | ||
alias cl='clear' | ||
alias c='composer' | ||
alias art='php artisan' | ||
|
||
alias phpspec='vendor/bin/phpspec' | ||
alias phpunit='vendor/bin/phpunit' | ||
|
||
function serve() { | ||
if [[ "$1" && "$2" ]] | ||
then | ||
sudo dos2unix /vagrant/scripts/serve.sh | ||
sudo bash /vagrant/scripts/serve.sh "$1" "$2" 80 | ||
else | ||
echo "Error: missing required parameters." | ||
echo "Usage: " | ||
echo " serve domain path" | ||
fi | ||
} | ||
|
||
function serve-hhvm() { | ||
if [[ "$1" && "$2" ]] | ||
then | ||
sudo dos2unix /vagrant/scripts/serve-hhvm.sh | ||
sudo bash /vagrant/scripts/serve-hhvm.sh "$1" "$2" 80 | ||
else | ||
echo "Error: missing required parameters." | ||
echo "Usage: " | ||
echo " serve-hhvm domain path" | ||
fi | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.