-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
32 lines (28 loc) · 771 Bytes
/
Rakefile
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
task :default => :stage
desc "Build app"
task :build do
sh "xbuild *.sln"
end
desc "Deploy to Heroku"
task :deploy => :build do
sh "git push heroku master"
end
desc "Stage locally"
task :stage => :build do
sh "foreman start local"
end
desc "Creates a Heroku app"
task :init do
sh "heroku create --stack cedar-14 --buildpack http://github.com/BenHall/heroku-buildpack-mono"
if `git remote show -n heroku` =~ /[email protected]:(.+)\.git/
host = $1
sh "heroku config:set HOST=#{host}.herokuapp.com"
sh "heroku config:set PORT=8080"
sh "echo \"HOST=#{host}\" >> .env"
sh "echo \"PORT=8080\" >> .env"
else
puts "Could not detect app hostname. Please configure your HOST environment variable manually"
end
Rake::Task[:deploy].invoke
sh "heroku open"
end