-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile.rb
61 lines (50 loc) · 1.68 KB
/
Rakefile.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
# frozen_string_literal: true
artefact = "jekyll-theme-emojification"
task :default => ["gembuild"]
desc "Builds the site"
task :build do
Rake::Task[:iconbuild].invoke
puts "==> Building #{artefact}..."
system "JEKYLL_ENV=\"production\" bundle exec jekyll build"
end
desc "Serves the site locally"
task :serve do
Rake::Task[:iconbuild].invoke
puts "==> Building and serving #{artefact} locally..."
system "bundle exec jekyll serve"
end
desc "Builds the demo site"
task :demobuild do
puts "==> Building #{artefact}-demo..."
system "cd _demo && rake build"
end
desc "Serves the demo site locally"
task :demoserve do
puts "==> Building and serving #{artefact} -demo locally..."
system "cd _demo && rake serve"
end
desc "Builds the gem"
task :gembuild do
puts "==> Building gem #{artefact}..."
system "gem build #{artefact}.gemspec"
end
desc "Installs the local gem, needs version number like `rake geminstall\[1.0.0\]`"
task :geminstall, [:version] do |task, args|
puts "==> Installing local gem #{artefact}-#{args[:version]}.gem..."
system "gem install --local #{artefact}-#{args[:version]}.gem"
end
desc "Uninstalls the local gem"
task :gemuninstall do
puts "==> Uninstalling local gem #{artefact}..."
system "gem uninstall #{artefact}"
end
desc "Pushes the gem to rubygems.org, needs version number like `rake gempush\[1.0.0\]`"
task :gempush, [:version] do |task, args|
puts "==> Pushing gem #{artefact}-#{args[:version]}.gem to rubygems.org..."
system "gem push #{artefact}-#{args[:version]}.gem"
end
desc "Builds the icons"
task :iconbuild do
puts "==> Building #{artefact} icons..."
system "cd _tools && ./generate-icons.sh webp && ./generate-icons.sh svg"
end