5 | 5 |
dh_auto_install doesn't work because any task for install are defined in
|
6 | 6 |
Rakefile. Add task :install to use dh_ruby correctly in build.
|
7 | 7 |
---
|
8 | |
Rakefile | 12 ++++++++++++
|
9 | |
1 file changed, 12 insertions(+)
|
|
8 |
Rakefile | 138 ++++++++++++++++++++++++++++++++++-----------------------------
|
|
9 |
1 file changed, 74 insertions(+), 64 deletions(-)
|
10 | 10 |
|
11 | 11 |
diff --git a/Rakefile b/Rakefile
|
12 | |
index 624f813..edcc5f3 100755
|
|
12 |
index 624f813..76cb249 100755
|
13 | 13 |
--- a/Rakefile
|
14 | 14 |
+++ b/Rakefile
|
15 | |
@@ -87,6 +87,18 @@ end
|
|
15 |
@@ -7,67 +7,67 @@ require 'bundler/gem_helper'
|
|
16 |
require './lib/fox16/version.rb'
|
16 | 17 |
|
17 | |
task :gem => ["ext/fox16_c/extconf.rb", "fxruby:configure", :build]
|
18 | 18 |
|
|
19 |
-class FoxGemHelper < Bundler::GemHelper
|
|
20 |
- attr_accessor :cross_platforms
|
|
21 |
-
|
|
22 |
- def install
|
|
23 |
- super
|
|
24 |
-
|
|
25 |
- task "release:guard_clean" => ["release:update_history"]
|
|
26 |
-
|
|
27 |
- task "release:update_history" do
|
|
28 |
- update_history
|
|
29 |
- end
|
|
30 |
-
|
|
31 |
- task "release:rubygem_push" => ["gem:windows"]
|
|
32 |
- end
|
|
33 |
-
|
|
34 |
- def hfile
|
|
35 |
- "History.md"
|
|
36 |
- end
|
|
37 |
-
|
|
38 |
- def headline
|
|
39 |
- '([^\w]*)(\d+\.\d+\.\d+(?:\.\w+)?)([^\w]+)([2Y][0Y][0-9Y][0-9Y]-[0-1M][0-9M]-[0-3D][0-9D])([^\w]*|$)'
|
|
40 |
- end
|
|
41 |
-
|
|
42 |
- def reldate
|
|
43 |
- Time.now.strftime("%Y-%m-%d")
|
|
44 |
- end
|
|
45 |
-
|
|
46 |
- def update_history
|
|
47 |
- hin = File.read(hfile)
|
|
48 |
- hout = hin.sub(/#{headline}/) do
|
|
49 |
- raise "#{hfile} isn't up-to-date for version #{version}" unless $2==version.to_s
|
|
50 |
- $1 + $2 + $3 + reldate + $5
|
|
51 |
- end
|
|
52 |
- if hout != hin
|
|
53 |
- Bundler.ui.confirm "Updating #{hfile} for release."
|
|
54 |
- File.write(hfile, hout)
|
|
55 |
- Rake::FileUtilsExt.sh "git", "commit", hfile, "-m", "Update release date in #{hfile}"
|
|
56 |
- end
|
|
57 |
- end
|
|
58 |
-
|
|
59 |
- def tag_version
|
|
60 |
- Bundler.ui.confirm "Tag release with annotation:"
|
|
61 |
- m = File.read(hfile).match(/(?<annotation>#{headline}.*?)#{headline}/m) || raise("Unable to find release notes in #{hfile}")
|
|
62 |
- Bundler.ui.info(m[:annotation].gsub(/^/, " "))
|
|
63 |
- IO.popen(["git", "tag", "--file=-", version_tag], "w") do |fd|
|
|
64 |
- fd.write m[:annotation]
|
|
65 |
- end
|
|
66 |
- yield if block_given?
|
|
67 |
- rescue
|
|
68 |
- Bundler.ui.error "Untagging #{version_tag} due to error."
|
|
69 |
- sh_with_code "git tag -d #{version_tag}"
|
|
70 |
- raise
|
|
71 |
- end
|
|
72 |
-
|
|
73 |
- def rubygem_push(path)
|
|
74 |
- cross_platforms.each do |ruby_platform|
|
|
75 |
- super(path.gsub(/\.gem\z/, "-#{ruby_platform}.gem"))
|
|
76 |
- end
|
|
77 |
- super(path)
|
|
78 |
- end
|
|
79 |
-end
|
|
80 |
+#class FoxGemHelper < Bundler::GemHelper
|
|
81 |
+# attr_accessor :cross_platforms
|
|
82 |
+#
|
|
83 |
+# def install
|
|
84 |
+# super
|
|
85 |
+#
|
|
86 |
+# task "release:guard_clean" => ["release:update_history"]
|
|
87 |
+#
|
|
88 |
+# task "release:update_history" do
|
|
89 |
+# update_history
|
|
90 |
+# end
|
|
91 |
+#
|
|
92 |
+# task "release:rubygem_push" => ["gem:windows"]
|
|
93 |
+# end
|
|
94 |
+#
|
|
95 |
+# def hfile
|
|
96 |
+# "History.md"
|
|
97 |
+# end
|
|
98 |
+#
|
|
99 |
+# def headline
|
|
100 |
+# '([^\w]*)(\d+\.\d+\.\d+(?:\.\w+)?)([^\w]+)([2Y][0Y][0-9Y][0-9Y]-[0-1M][0-9M]-[0-3D][0-9D])([^\w]*|$)'
|
|
101 |
+# end
|
|
102 |
+#
|
|
103 |
+# def reldate
|
|
104 |
+# Time.now.strftime("%Y-%m-%d")
|
|
105 |
+# end
|
|
106 |
+#
|
|
107 |
+# def update_history
|
|
108 |
+# hin = File.read(hfile)
|
|
109 |
+# hout = hin.sub(/#{headline}/) do
|
|
110 |
+# raise "#{hfile} isn't up-to-date for version #{version}" unless $2==version.to_s
|
|
111 |
+# $1 + $2 + $3 + reldate + $5
|
|
112 |
+# end
|
|
113 |
+# if hout != hin
|
|
114 |
+# Bundler.ui.confirm "Updating #{hfile} for release."
|
|
115 |
+# File.write(hfile, hout)
|
|
116 |
+# Rake::FileUtilsExt.sh "git", "commit", hfile, "-m", "Update release date in #{hfile}"
|
|
117 |
+# end
|
|
118 |
+# end
|
|
119 |
+
|
|
120 |
+# def tag_version
|
|
121 |
+# Bundler.ui.confirm "Tag release with annotation:"
|
|
122 |
+# m = File.read(hfile).match(/(?<annotation>#{headline}.*?)#{headline}/m) || raise("Unable to find release notes in #{hfile}")
|
|
123 |
+# Bundler.ui.info(m[:annotation].gsub(/^/, " "))
|
|
124 |
+# IO.popen(["git", "tag", "--file=-", version_tag], "w") do |fd|
|
|
125 |
+# fd.write m[:annotation]
|
|
126 |
+# end
|
|
127 |
+# yield if block_given?
|
|
128 |
+# rescue
|
|
129 |
+# Bundler.ui.error "Untagging #{version_tag} due to error."
|
|
130 |
+# sh_with_code "git tag -d #{version_tag}"
|
|
131 |
+# raise
|
|
132 |
+# end
|
|
133 |
+#
|
|
134 |
+# def rubygem_push(path)
|
|
135 |
+# cross_platforms.each do |ruby_platform|
|
|
136 |
+# super(path.gsub(/\.gem\z/, "-#{ruby_platform}.gem"))
|
|
137 |
+# end
|
|
138 |
+# super(path)
|
|
139 |
+# end
|
|
140 |
+#end
|
|
141 |
|
|
142 |
# Some constants we'll need
|
|
143 |
LIBFXSCINTILLA_VERSION = ENV['LIBFXSCINTILLA_VERSION'] || '2.28.0'
|
|
144 |
@@ -85,7 +85,17 @@ task :test => [:compile] do
|
|
145 |
sh "ruby -w -W2 -Ilib test/TS_All.rb -v"
|
|
146 |
end
|
|
147 |
|
|
148 |
-task :gem => ["ext/fox16_c/extconf.rb", "fxruby:configure", :build]
|
|
149 |
+task :default => ["ext/fox16_c/extconf.rb", "fxruby:configure"]
|
|
150 |
+
|
19 | 151 |
+desc "Install gem"
|
20 | |
+task :install => :compile do
|
21 | |
+ system "gem install fxruby-#{PKG_VERSION}.gem"
|
22 | |
+end
|
|
152 |
+task :install => :compile
|
23 | 153 |
+
|
24 | 154 |
+# The "docs" task created by Hoe assumes that we want to run RDoc
|
25 | 155 |
+# over everything under the "lib" and "ext" subdirectories.
|
|
27 | 157 |
+# rdoc_target = Rake::Task['docs'].prerequisites.first
|
28 | 158 |
+# rdoc_files = Rake::Task[rdoc_target].prerequisites
|
29 | 159 |
+# rdoc_files.reject! {|x| x == "ext/fox16_c" }
|
30 | |
+
|
|
160 |
|
31 | 161 |
|
32 | 162 |
gem_spec = Bundler.load_gemspec('fxruby.gemspec')
|
|
163 |
@@ -139,8 +149,8 @@ ext_task = Rake::ExtensionTask.new("fox16_c", gem_spec) do |ext|
|
|
164 |
end
|
|
165 |
end
|
33 | 166 |
|
|
167 |
- FoxGemHelper.install_tasks
|
|
168 |
- Bundler::GemHelper.instance.cross_platforms = ext.cross_platform
|
|
169 |
+ #FoxGemHelper.install_tasks
|
|
170 |
+ #Bundler::GemHelper.instance.cross_platforms = ext.cross_platform
|
|
171 |
end
|
|
172 |
|
|
173 |
namespace :gem do
|