forked from decko-commons/decko
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathRakefile
48 lines (40 loc) · 934 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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# -*- encoding : utf-8 -*-
#
require "./decko_gem"
# Note: these tasks are not in any gem and are thus not available to mod
# developers. Therefore they should contain only tasks for core developers.
task :push_gems do
# push_main_gems
push_mod_gems
end
task :version do
puts version
end
task :release do
system %(
git tag -a v#{version} -m "Decko Version #{version}"
git push --tags decko
)
end
def push_gem gem, version
%(
rm *.gem
gem build #{gem}.gemspec
gem push #{gem}-#{version}.gem
)
end
def push_main_gems
%w(card cardname decko).each do |gem|
v = gem == "card" ? DeckoGem.card_version : version
system %(cd #{gem}; #{push_gem gem, v})
end
end
def push_mod_gems
%w(edit ace_editor prosemirror_editor tinymce_editor date recaptcha).each do |gem|
gem = "card-mod-#{gem}"
system %(cd #{gem}; #{push_gem gem, version})
end
end
def version
DeckoGem.version
end