-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdev-tools.rb
86 lines (75 loc) · 1.72 KB
/
dev-tools.rb
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
dep 'dev-tools' do
requires 'homebrew-packages'
end
dep 'old-dev-tools' do
requires {
on :linux, %w[
tmux.managed
silversearcher-ag.managed
]
on :osx, %w[
iTerm.app
homebrew
homebrew-packages
vagrant.installer
xcode-command-line-tools
zsh.managed
alt
]
}
requires 'doctl.managed'
requires 'heroku'
requires 'gems'
requires 'tree.managed'
requires 'vagrant.installer'
end
dep 'xcode-command-line-tools' do
met? { shell? "xcode-select -p &>/dev/null" }
meet { shell "xcode-select --install" }
end
dep 'silversearcher-ag.managed' do
provides 'ag'
end
dep 'alt' do
before { shell "brew tap uptech/homebrew-oss" }
met? { shell? "brew list | grep ^alt$" }
meet { shell "brew install uptech/oss/alt" }
end
dep 'heroku' do
before { shell "brew tap heroku/brew" }
met? { shell? "brew list | grep ^heroku$" }
meet { shell "brew install heroku" }
end
dep 'heroku-git-remotes', :target, :remote_name, :app do
met? {
cd target do
shell("git remote -v").include?(
"#{remote_name}\thttps://git.heroku.com/#{app}.git (fetch)\n" +
"#{remote_name}\thttps://git.heroku.com/#{app}.git (push)"
)
end
}
meet {
cd target do
shell "git remote add #{remote_name} https://git.heroku.com/#{app}.git"
end
}
end
dep 'dependencies-installed', :path do
log path
requires 'bundles-installed'.with(path) if path.p.join('Gemfile').exists?
requires 'packages-installed'.with(path) if path.p.join('package.json').exists?
end
dep 'packages-installed', :path do
requires 'yarn.managed'
met? {
cd path do
shell? "yarn check"
end
}
meet {
cd path do
shell "yarn install"
end
}
end