diff --git a/Vagrantfile b/Vagrantfile index 6bb2e24..a36b1f6 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -10,6 +10,7 @@ confDir = $confDir ||= File.expand_path("vendor/laravel/homestead", File.dirname homesteadYamlPath = File.expand_path("Homestead.yaml", File.dirname(__FILE__)) homesteadJsonPath = File.expand_path("Homestead.json", File.dirname(__FILE__)) afterScriptPath = "after.sh" +customizationScriptPath = "user-customizations.sh" aliasesPath = "aliases" require File.expand_path(confDir + '/scripts/homestead.rb') @@ -29,7 +30,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| elsif File.exist? homesteadJsonPath then settings = JSON.parse(File.read(homesteadJsonPath)) else - abort "Homestead settings file not found in #{confDir}" + abort "Homestead settings file not found in " + File.dirname(__FILE__) end Homestead.configure(config, settings) @@ -38,6 +39,10 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| config.vm.provision "shell", path: afterScriptPath, privileged: false, keep_color: true end + if File.exist? customizationScriptPath then + config.vm.provision "shell", path: customizationScriptPath, privileged: false, keep_color: true + end + if defined? VagrantPlugins::HostsUpdater config.hostsupdater.aliases = settings['sites'].map { |site| site['map'] } end diff --git a/composer.json b/composer.json index ee9b210..c79ff20 100644 --- a/composer.json +++ b/composer.json @@ -29,8 +29,8 @@ "barryvdh/laravel-ide-helper": "^2.4", "nunomaduro/collision": "^2.0", "codedungeon/phpunit-result-printer": "^0.19.10", - "laravel/homestead": "^7.12", - "beyondcode/laravel-dump-server": "^1.1" + "beyondcode/laravel-dump-server": "^1.1", + "laravel/homestead": "^7.19" }, "autoload": { "psr-4": { diff --git a/composer.lock b/composer.lock index 0052e62..1fbb313 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "77896b23e2773794819b23dfadf79581", + "content-hash": "5839bbb59f51aaaeea30b01fb199a2b1", "packages": [ { "name": "classpreloader/classpreloader",