-
Notifications
You must be signed in to change notification settings - Fork 177
Expand file tree
/
Copy pathRakefile
More file actions
44 lines (37 loc) · 1.07 KB
/
Rakefile
File metadata and controls
44 lines (37 loc) · 1.07 KB
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
require 'pathname'
require 'time'
PROJ_DIR = Pathname.new(__dir__)
TASK_DIR = "#{PROJ_DIR}/lib/tasks"
APPS_DIR = PROJ_DIR.join('apps')
GEMFILE = PROJ_DIR.join('Gemfile')
DESTDIR = Pathname.new(ENV['DESTDIR'].to_s)
INSTALL_ROOT = Pathname.new(ENV['PREFIX'] || "#{DESTDIR}/opt/ood")
VENDOR_BUNDLE = ['yes', 'true'].include?(ENV['VENDOR_BUNDLE'])
PASSENGER_APP_ENV = ENV['PASSENGER_APP_ENV'] || 'production'
require "#{TASK_DIR}/rake_helper"
require "#{TASK_DIR}/build"
require "#{TASK_DIR}/packaging"
require "#{TASK_DIR}/test"
require "#{TASK_DIR}/lint"
require "#{TASK_DIR}/development"
require "#{TASK_DIR}/install"
include RakeHelper
desc 'Clean up build'
task :clean do
sh 'git clean -Xdf'
end
desc 'Update Ondemand'
task :update do
ruby_apps.each do |app|
chdir app.path
Bundler.with_unbundled_env do
sh 'bundle update'
end
end
yarn_apps.each do |app|
chdir app.path
sh 'npm install --production --prefix tmp yarn'
sh 'tmp/node_modules/yarn/bin/yarn upgrade'
end
end
task default: ['test']