-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathVagrantfile.macos.deps
65 lines (50 loc) · 1.52 KB
/
Vagrantfile.macos.deps
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# -*- mode: ruby -*-
# vi: set ft=ruby :
versions = Hash[
"big_sur" => "11.2.3",
"monterey" => "12.6.1",
"ventura" => "13.5",
]
tools = Hash[
"big_sur" => "12.5.1",
"monterey" => "14.1",
"ventura" => "14.1",
]
macos_name = ENV["MACOS_NAME"] || "big_sur"
if macos_name == ""
puts "ENV['MACOS_NAME'] is not set"
exit
end
if !versions.member?(macos_name) || !tools.member?(macos_name)
puts "Unknown 'MACOS_NAME': #{macos_name}"
exit
end
macos_version = versions[macos_name]
tools_version = tools[macos_name]
Vagrant.configure("2") do |config|
config.vm.box = "macos-#{macos_name}-#{macos_version}"
config.vm.define "macos-#{macos_name}-build"
config.vm.box_check_update = false
# "rsync" is host to guest only
#config.vm.synced_folder ".", "/Users/vagrant/Shared", type: "rsync"
config.vm.synced_folder ".", "/vagrant", :disabled => true
config.vm.provider "virtualbox" do |vb|
vb.gui = true
vb.cpus = 2
vb.memory = 4096
vb.check_guest_additions = false
vb.customize ["modifyvm", :id, "--vram", "256"]
# Enable USB 1.1
vb.customize ["modifyvm", :id, "--usbohci", "on"]
# Disable USB 2.0 & 3.0 Controllers
vb.customize ["modifyvm", :id, "--usbehci", "off"]
vb.customize ["modifyvm", :id, "--usbxhci", "off"]
end
config.vm.provision "file",
source: "./macos/Command_Line_Tools_for_Xcode_#{tools_version}.dmg",
destination: "/Users/vagrant/"
config.vm.provision "shell",
binary: true,
path: "./macos/bootstrap.sh",
args: "#{tools_version}"
end