RubyPackager 0.1.0.20091021 → 0.1.1.20091105

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. data/{F:/RR/Source/rubypackager/svn/rubypackager/Releases/i386-mswin32/0.1.0.20091021/Normal/2009_10_21_19_10_02/Release/AUTHORS → AUTHORS} +0 -0
  2. data/ChangeLog +67 -0
  3. data/{F:/RR/Source/rubypackager/svn/rubypackager/Releases/i386-mswin32/0.1.0.20091021/Normal/2009_10_21_19_10_02/Release/Credits → Credits} +0 -0
  4. data/{F:/RR/Source/rubypackager/svn/rubypackager/Releases/i386-mswin32/0.1.0.20091021/Normal/2009_10_21_19_10_02/Release/LICENSE → LICENSE} +0 -0
  5. data/{F:/RR/Source/rubypackager/svn/rubypackager/Releases/i386-mswin32/0.1.0.20091021/Normal/2009_10_21_19_10_02/Release/README → README} +0 -0
  6. data/{F:/RR/Source/rubypackager/svn/rubypackager/Releases/i386-mswin32/0.1.0.20091021/Normal/2009_10_21_19_10_02/Release/ReleaseInfo → ReleaseInfo} +1 -1
  7. data/TODO +14 -0
  8. data/bin/Release.rb +206 -0
  9. data/{F:/RR/Source/rubypackager/svn/rubypackager/Releases/i386-mswin32/0.1.0.20091021/Normal/2009_10_21_19_10_02/Release/lib → lib}/RubyPackager/Distributors/SourceForge.rb +12 -9
  10. data/{F:/RR/Source/rubypackager/svn/rubypackager/Releases/i386-mswin32/0.1.0.20091021/Normal/2009_10_21_19_10_02/Release/lib → lib}/RubyPackager/Installers/Gem.rb +8 -13
  11. data/{F:/RR/Source/rubypackager/svn/rubypackager/Releases/i386-mswin32/0.1.0.20091021/Normal/2009_10_21_19_10_02/Release/lib → lib}/RubyPackager/ReleaseInfo.rb +1 -11
  12. data/{F:/RR/Source/rubypackager/svn/rubypackager/Releases/i386-mswin32/0.1.0.20091021/Normal/2009_10_21_19_10_02/Release/lib → lib}/RubyPackager/Releaser.rb +130 -102
  13. data/{F:/RR/Source/rubypackager/svn/rubypackager/Releases/i386-mswin32/0.1.0.20091021/Normal/2009_10_21_19_10_02/Release/lib → lib}/RubyPackager/Tools.rb +0 -0
  14. data/lib/RubyPackager/i386-linux/PlatformReleaser.rb +117 -0
  15. data/{F:/RR/Source/rubypackager/svn/rubypackager/Releases/i386-mswin32/0.1.0.20091021/Normal/2009_10_21_19_10_02/Release/lib → lib}/RubyPackager/i386-mswin32/Installers/NSIS.rb +3 -4
  16. data/{F:/RR/Source/rubypackager/svn/rubypackager/Releases/i386-mswin32/0.1.0.20091021/Normal/2009_10_21_19_10_02/Release/lib → lib}/RubyPackager/i386-mswin32/PlatformReleaser.rb +6 -9
  17. data/{F:/RR/Source/rubypackager/svn/rubypackager/Releases/i386-mswin32/0.1.0.20091021/Normal/2009_10_21_19_10_02/Release/lib → lib}/RubyPackager/i386-mswin32/edicon/edicon.exe +0 -0
  18. data/test/Common.rb +346 -0
  19. data/test/PlatformIndependent/CommandLine.rb +156 -0
  20. data/test/PlatformIndependent/Executable.rb +31 -0
  21. data/test/PlatformIndependent/Library.rb +31 -0
  22. data/test/PlatformIndependent/Misc.rb +62 -0
  23. data/test/PlatformIndependent/Plugins/Distributors/SourceForge.rb +81 -0
  24. data/test/PlatformIndependent/Plugins/Installers/Gem.rb +142 -0
  25. data/test/Repository/Applications/Basic/Distribution/ReleaseInfo.rb +27 -0
  26. data/test/Repository/Applications/Basic/Distribution/ReleaseInfo_Exe.rb +33 -0
  27. data/test/Repository/Applications/Basic/Distribution/ReleaseInfo_ExeTerm.rb +33 -0
  28. data/test/Repository/Applications/Basic/Distribution/ReleaseInfo_Gem.rb +32 -0
  29. data/{F:/RR/Source/rubypackager/svn/rubypackager/Releases/i386-mswin32/0.1.0.20091021/Normal/2009_10_21_19_10_02/Release/test → test/Repository}/Applications/Basic/Distribution/i386-mswin32/Icon.ico +0 -0
  30. data/{F:/RR/Source/rubypackager/svn/rubypackager/Releases/i386-mswin32/0.1.0.20091021/Normal/2009_10_21_19_10_02/Release/test → test/Repository}/Applications/Basic/Distribution/i386-mswin32/Installer/Icon.ico +0 -0
  31. data/{F:/RR/Source/rubypackager/svn/rubypackager/Releases/i386-mswin32/0.1.0.20091021/Normal/2009_10_21_19_10_02/Release/test → test/Repository}/Applications/Basic/Distribution/i386-mswin32/Installer/InstallLicense.txt +0 -0
  32. data/{F:/RR/Source/rubypackager/svn/rubypackager/Releases/i386-mswin32/0.1.0.20091021/Normal/2009_10_21_19_10_02/Release/test → test/Repository}/Applications/Basic/Distribution/i386-mswin32/Installer/install.nsi +0 -0
  33. data/{F:/RR/Source/rubypackager/svn/rubypackager/Releases/i386-mswin32/0.1.0.20091021/Normal/2009_10_21_19_10_02/Release/test → test/Repository}/Applications/Basic/Main.rb +0 -0
  34. data/test/Repository/Libraries/Basic/Add.rb +6 -0
  35. data/test/Repository/Libraries/Basic/Distribution/Icon.ico +0 -0
  36. data/test/Repository/Libraries/Basic/Distribution/InstallLicense.txt +31 -0
  37. data/test/Repository/Libraries/Basic/Distribution/ReleaseInfo.rb +24 -0
  38. data/test/Repository/Libraries/Basic/Distribution/ReleaseInfo_Additional.rb +27 -0
  39. data/test/Repository/Libraries/Basic/Distribution/ReleaseInfo_Gem.rb +29 -0
  40. data/test/Repository/Libraries/Basic/Distribution/ReleaseInfo_GemDep.rb +32 -0
  41. data/test/Repository/Libraries/Basic/Distribution/ReleaseInfo_NSIS.rb +28 -0
  42. data/test/Repository/Libraries/Basic/Distribution/ReleaseInfo_SF.rb +28 -0
  43. data/test/Repository/Libraries/Basic/Distribution/ReleaseInfo_Test.rb +27 -0
  44. data/test/Repository/Libraries/Basic/Distribution/ReleaseInfo_TestGem.rb +33 -0
  45. data/test/Repository/Libraries/Basic/Distribution/install.nsi +53 -0
  46. data/test/Repository/Libraries/Basic/MainLib.rb +6 -0
  47. data/test/Repository/Libraries/Basic/Test.rb +6 -0
  48. data/test/i386-linux/Executable.rb +86 -0
  49. data/test/i386-mswin32/Executable.rb +90 -0
  50. data/test/i386-mswin32/Plugins/Installers/NSIS.rb +39 -0
  51. data/test/run.rb +6 -2
  52. metadata +56 -29
  53. data/F:/RR/Source/rubypackager/svn/rubypackager/Releases/i386-mswin32/0.1.0.20091021/Normal/2009_10_21_19_10_02/Release/ChangeLog +0 -17
  54. data/F:/RR/Source/rubypackager/svn/rubypackager/Releases/i386-mswin32/0.1.0.20091021/Normal/2009_10_21_19_10_02/Release/TODO +0 -11
  55. data/F:/RR/Source/rubypackager/svn/rubypackager/Releases/i386-mswin32/0.1.0.20091021/Normal/2009_10_21_19_10_02/Release/test/Applications/Basic/Distribution/ReleaseInfo.rb +0 -16
  56. data/F:/RR/Source/rubypackager/svn/rubypackager/Releases/i386-mswin32/0.1.0.20091021/Normal/2009_10_21_19_10_02/Release/test/Common.rb +0 -50
  57. data/F:/RR/Source/rubypackager/svn/rubypackager/Releases/i386-mswin32/0.1.0.20091021/Normal/2009_10_21_19_10_02/Release/test/i386-mswin32/run.rb +0 -19
  58. data/F:/RR/Source/rubypackager/svn/rubypackager/Releases/i386-mswin32/0.1.0.20091021/Normal/2009_10_21_19_10_02/Release/test/run.rb +0 -19
data/ChangeLog ADDED
@@ -0,0 +1,67 @@
1
+ = RubyPackager Release History
2
+
3
+ == 0.1.1.20091105 (Alpha)
4
+
5
+ === New features
6
+
7
+ * Implemented generation of Linux executables, with and without Ruby (with Ruby not tested correctly yet)
8
+ * Moved directory containing modifications to perform in a separate place (Modifications dir)
9
+ * Regression: Added test cases for Linux executables generated.
10
+ * Adapted regression to run correctly under Linux.
11
+ * -h option also gives the version of RubyPackager.
12
+ * --debug option enables debugging logs.
13
+ * Used rUtilAnts/Logging for logging.
14
+ * Give the possibility to not generate RDoc by --no-rdoc command line option.
15
+ * SourceForge distributor handles RDoc only if it has been generated.
16
+ * NSIS installer does not need anymore ExeName to be set: use an additional InstallerName property instead.
17
+ * Removed useless checkTools method from Gem Installer.
18
+ * RubyPackager automatically creates directories Installer, Documentation and Release to not let this be done by plugins.
19
+ * Try Muriel templates for RDoc, and switch back to default template in case of error.
20
+ * Added RDoc modifications to make before using RubyPackager.
21
+ * Use Muriel templates when generating RDoc.
22
+ * No need anymore to set $ReleaseInfo variable in ReleaseInfo files.
23
+ * Adapted RubyPackager's ReleaseInfo to the new interface.
24
+ * Removed useless checkTools method from ReleaseInfo.
25
+
26
+ === Regression
27
+
28
+ * Regression: Logging errors correctly.
29
+ * Regression: Added test cases for binaries created with and without Ruby on Windows.
30
+ * Regression: Muted output (still remains external programs output)
31
+ * Regression: Added test cases for:
32
+ ** Gem Installer
33
+ ** NSIS Installer
34
+ ** SourceForge Distributor
35
+ * Regression: Better organization of test cases.
36
+ * Regression: Added test cases for:
37
+ ** Command line options.
38
+ ** Basic library release.
39
+ ** Basic executable release.
40
+ * Regression: Added checks for ReleaseInfo file presence and content.
41
+ * Regression: Refactored regression to cope with new interface.
42
+ * Regression: Added a simple library release test.
43
+
44
+ === Bug corrections
45
+
46
+ * Bug correction: When RubyPackager's Launcher was invoked after having changed current directory, it could not find plugins anymore.
47
+ * Bug correction: when Installers or Distributors did not define checkTools, an error was issued.
48
+ * Bug correction: Generated ReleaseInfo file was reporting Tags incorrectly.
49
+ * Bug correction: Test files were included in releases even without -n flag.
50
+ * Bug correction: When asked for help with -h switch, an error was displayed.
51
+ * Bug correction: Exception occurred while generating ReleaseNotes when no release comment was provided.
52
+
53
+ == 0.1.0.20091021 (Alpha)
54
+
55
+ * Implemented release of libraries as well.
56
+ * Implemented generation of Installers.
57
+ * Implemented distribution to third parties (SourceForge...).
58
+ * Harmonized the way ReleaseInfo are described (!!! complete change with no compatibility with previous format).
59
+ * Plugins architecture for Installers and Distributors.
60
+ * Removed .rb suffixes in required files (better migration to .so if needed).
61
+ * Removed references to PBS.
62
+ * Bug correction: Dir.glob does not work correctly with '\'.
63
+ * Bug correction: Application specific checks for tools were ignored.
64
+
65
+ == 0.0.1.20090819 (Alpha)
66
+
67
+ * Initial public release.
@@ -2,7 +2,7 @@
2
2
  # This file has been generated by RubyPackager during a delivery.
3
3
  # More info about RubyPackager: http://rubypackager.sourceforge.net
4
4
  {
5
- :Version => '0.1.0.20091021',
5
+ :Version => '0.1.1.20091105',
6
6
  :Tags => [],
7
7
  :DevStatus => 'Alpha'
8
8
  }
data/TODO ADDED
@@ -0,0 +1,14 @@
1
+ * Documentation
2
+ ** Write a complete User Guide.
3
+ ** Write a complete Developer Guide.
4
+ ** Create FAQ
5
+
6
+ * Testing
7
+ ** Test that each possible option from ReleaseInfo is used correctly in every context (Installers, Distributors...)
8
+ ** Test checkTools on ReleaseInfo, Installers and Distributors
9
+ ** Test that including Ruby in exe effectively works in an environment not having Ruby
10
+
11
+ * Development
12
+ ** Make it run under MacOS
13
+ ** Make rdoc modifications part of a real Gem or an RDoc improvement.
14
+ ** Use RDI in checkContext methods.
data/bin/Release.rb ADDED
@@ -0,0 +1,206 @@
1
+ #!env ruby
2
+ #--
3
+ # Copyright (c) 2009 Muriel Salvan (murielsalvan@users.sourceforge.net)
4
+ # Licensed under the terms specified in LICENSE file. No warranty is provided.
5
+ #++
6
+
7
+ # Release a distribution of a Ruby program or library.
8
+ # Here is the behaviour:
9
+ # 1. Gather all files meant to be released in a separate directory (Core, Additional and Test if specified)
10
+ # 2. In the case of an executable release, generate the executable with Core files and Ruby distribution if specified
11
+ # 3. In the case of specified installers, generate the needed installers including the Core files (or the executable), the Additional files and Test if specified)
12
+ # 4. In the case of specified distributors, ship the generated installers to those distributors
13
+
14
+ require 'rUtilAnts/Logging'
15
+ RUtilAnts::Logging::initializeLogging("#{File.dirname(__FILE__)}/..", 'http://sourceforge.net/tracker/?group_id=274236&atid=1165400')
16
+
17
+ module RubyPackager
18
+
19
+ # Class giving command line options for the releaser
20
+ class Launcher
21
+
22
+ FILE_PATH = File.expand_path(__FILE__)
23
+
24
+ # Run the releaser
25
+ #
26
+ # Parameters:
27
+ # * *iParameters* (<em>list<String></em>): List of arguments, as in command-line
28
+ # Return:
29
+ # * _Boolean_: Success ?
30
+ def run(iParameters)
31
+ rSuccess = true
32
+
33
+ # Get the RubyPackager version we are running on
34
+ lRPReleaseInfo = {
35
+ :Version => 'Development',
36
+ :Tags => [],
37
+ :DevStatus => 'Unofficial'
38
+ }
39
+ lReleaseInfoFileName = "#{File.dirname(FILE_PATH)}/ReleaseInfo"
40
+ if (File.exists?(lReleaseInfoFileName))
41
+ File.open(lReleaseInfoFileName, 'r') do |iFile|
42
+ lRPReleaseInfo = eval(iFile.read)
43
+ end
44
+ end
45
+
46
+ # Parse for plugins
47
+ require 'rUtilAnts/Plugins'
48
+ lPluginsManager = RUtilAnts::Plugins::PluginsManager.new
49
+ lPluginsManager.parsePluginsFromDir('Installers', "#{File.dirname(FILE_PATH)}/../lib/RubyPackager/Installers", 'RubyPackager::Installers')
50
+ lPluginsManager.parsePluginsFromDir('Installers', "#{File.dirname(FILE_PATH)}/../lib/RubyPackager/#{RUBY_PLATFORM}/Installers", 'RubyPackager::Installers')
51
+ lPluginsManager.parsePluginsFromDir('Distributors', "#{File.dirname(FILE_PATH)}/../lib/RubyPackager/Distributors", 'RubyPackager::Distributors')
52
+ lPluginsManager.parsePluginsFromDir('Distributors', "#{File.dirname(FILE_PATH)}/../lib/RubyPackager/#{RUBY_PLATFORM}/Distributors", 'RubyPackager::Distributors')
53
+
54
+ # Parse command line arguments
55
+ # Variables set by the parser
56
+ lDisplayUsage = false
57
+ lReleaseVersion = 'UnnamedVersion'
58
+ lReleaseTags = []
59
+ lReleaseComment = nil
60
+ lIncludeRuby = false
61
+ lIncludeTest = false
62
+ lIncludeRDoc = true
63
+ lInstallers = []
64
+ lDistributors = []
65
+ # The parser
66
+ require 'optparse'
67
+ lOptionsParser = OptionParser.new
68
+ lOptionsParser.banner = 'Release.rb [-h|--help] [-e|--debug] [-v|--version <Version>] [-t|--tag <TagName>]* [-c|--comment <Comment>] [-r|--ruby] [-n|--includeTest] [-o|--no-rdoc] [-i|--installer <InstallerName>]* [-d|--distributor <DistributorName>]* <ReleaseFile>'
69
+ lOptionsParser.on('-h', '--help',
70
+ 'Display help usage.') do
71
+ lDisplayUsage = true
72
+ end
73
+ lOptionsParser.on('-e', '--debug',
74
+ 'Activate debugging logs.') do
75
+ activateLogDebug(true)
76
+ end
77
+ lOptionsParser.on('-v', '--version <Version>', String,
78
+ '<Version>: Version string of the release.',
79
+ 'Set the version to display for this release.') do |iArg|
80
+ lReleaseVersion = iArg
81
+ end
82
+ lOptionsParser.on('-t', '--tag <TagName>', String,
83
+ '<TagName>: Tag to apply to this version.',
84
+ 'Set a Tag to this version. A Tag is a way to categorize the version (i.e. UltimateEdition, Alpha...).') do |iArg|
85
+ lReleaseTags << iArg
86
+ end
87
+ lOptionsParser.on('-c', '--comment <Comment>', String,
88
+ '<Comment>: Comment to add to the release note.',
89
+ 'Set the release comment to display for this release.') do |iArg|
90
+ lReleaseComment = iArg
91
+ end
92
+ lOptionsParser.on('-r', '--ruby',
93
+ 'Include Ruby distribution in the release (only applicable for executable releases).') do
94
+ lIncludeRuby = true
95
+ end
96
+ lOptionsParser.on('-n', '--includeTest',
97
+ 'Include Test files in the release.') do
98
+ lIncludeTest = true
99
+ end
100
+ lOptionsParser.on('-o', '--no-rdoc',
101
+ 'Do NOT generate RDoc.') do
102
+ lIncludeRDoc = false
103
+ end
104
+ lOptionsParser.on('-i', '--installer <InstallerName>', String,
105
+ '<InstallerName>: Name of an Installer to use.',
106
+ "Generate an installer. Can be specified multiple times. Available Installers are: #{lPluginsManager.getPluginNames('Installers').join(', ')}") do |iArg|
107
+ lInstallers << iArg
108
+ end
109
+ lOptionsParser.on('-d', '--distributor <DistributorName>', String,
110
+ '<DistributorName>: Name of a Distributor to use.',
111
+ "Ship generated installers to a distributor. Can be specified multiple times. Available Distributors are: #{lPluginsManager.getPluginNames('Distributors').join(', ')}") do |iArg|
112
+ lDistributors << iArg
113
+ end
114
+ lReleaseInfo = nil
115
+ begin
116
+ lRemainingArgs = lOptionsParser.parse(iParameters)
117
+ if (lRemainingArgs.size != 1)
118
+ if (!lDisplayUsage)
119
+ puts 'Wrong release file. Please specify 1 release file.'
120
+ puts lOptionsParser
121
+ rSuccess = false
122
+ end
123
+ else
124
+ # Check the Release file
125
+ lReleaseFile = lRemainingArgs[0]
126
+ require 'RubyPackager/ReleaseInfo'
127
+ File.open(lReleaseFile, 'r') do |iFile|
128
+ lReleaseInfo = eval(iFile.read)
129
+ end
130
+ if (!lReleaseInfo.kind_of?(RubyPackager::ReleaseInfo))
131
+ puts "Release file #{lReleaseFile} is incorrect. It does not define RubyPackager::ReleaseInfo variable. Please correct it and try again."
132
+ rSuccess = false
133
+ end
134
+ end
135
+ # Check the installers
136
+ lAvailableInstallers = lPluginsManager.getPluginNames('Installers')
137
+ lInstallers.each do |iInstallerName|
138
+ if (!lAvailableInstallers.include?(iInstallerName))
139
+ puts "Unknown specified installer: #{iInstallerName}."
140
+ puts lOptionsParser
141
+ rSuccess = false
142
+ end
143
+ end
144
+ # Check the distributors
145
+ lAvailableDistributors = lPluginsManager.getPluginNames('Distributors')
146
+ lDistributors.each do |iDistributorName|
147
+ if (!lAvailableDistributors.include?(iDistributorName))
148
+ puts "Unknown specified distributor: #{iDistributorName}."
149
+ puts lOptionsParser
150
+ rSuccess = false
151
+ end
152
+ end
153
+ rescue Exception
154
+ puts "Error while parsing arguments: #{$!}"
155
+ puts lOptionsParser
156
+ rSuccess = false
157
+ end
158
+ if (rSuccess)
159
+ if (lDisplayUsage)
160
+ puts "RubyPackager v. #{lRPReleaseInfo[:Version]} - #{lRPReleaseInfo[:DevStatus]}"
161
+ puts ''
162
+ puts lOptionsParser
163
+ else
164
+ # All is ok, call the library with parameters
165
+ require 'RubyPackager/Releaser'
166
+ # Require the platform specific distribution file
167
+ require "RubyPackager/#{RUBY_PLATFORM}/PlatformReleaser"
168
+ rSuccess = Releaser.new(
169
+ lPluginsManager,
170
+ lReleaseInfo,
171
+ Dir.getwd,
172
+ "#{Dir.getwd}/Releases",
173
+ PlatformReleaser.new,
174
+ lReleaseVersion,
175
+ lReleaseTags,
176
+ lReleaseComment,
177
+ lIncludeRuby,
178
+ lIncludeTest,
179
+ lIncludeRDoc,
180
+ lInstallers,
181
+ lDistributors
182
+ ).execute
183
+ if (rSuccess)
184
+ logInfo 'Release successful.'
185
+ else
186
+ logErr 'Error while releasing.'
187
+ end
188
+ end
189
+ end
190
+
191
+ return rSuccess
192
+ end
193
+
194
+ end
195
+
196
+ end
197
+
198
+ # Execute everything (take care that paths might differ in bin directories gems)
199
+ if (File.basename($0) == File.basename(__FILE__))
200
+ lSuccess = RubyPackager::Launcher.new.run(ARGV)
201
+ if (lSuccess)
202
+ exit 0
203
+ else
204
+ exit 1
205
+ end
206
+ end
@@ -23,17 +23,17 @@ module RubyPackager
23
23
  begin
24
24
  require 'net/ssh'
25
25
  rescue Exception
26
- puts '!!! Missing net/ssh library. gem install net-ssh.'
26
+ logErr 'Missing net/ssh library. gem install net-ssh.'
27
27
  rSuccess = false
28
28
  end
29
29
  begin
30
30
  require 'net/scp'
31
31
  rescue Exception
32
- puts '!!! Missing net/scp library. gem install net-scp.'
32
+ logErr 'Missing net/scp library. gem install net-scp.'
33
33
  rSuccess = false
34
34
  end
35
35
  if (!system('zip -v'))
36
- puts '!!! Missing zip command-line utility.'
36
+ logErr 'Missing zip command-line utility.'
37
37
  rSuccess = false
38
38
  end
39
39
 
@@ -59,7 +59,10 @@ module RubyPackager
59
59
  @SFReleaseDir = "/home/frs/project/#{@SFProjectSubPath}/#{@ReleaseVersion}"
60
60
  createSFShell
61
61
  createReleaseOnSFNET
62
- uploadRDocOnSFNET
62
+ # It is possible that he RDoc has not been generated
63
+ if (File.exists?("#{@DocDir}/rdoc"))
64
+ uploadRDocOnSFNET
65
+ end
63
66
  uploadReleaseNoteOnSFNET
64
67
  uploadFilesOnSFNET
65
68
 
@@ -88,7 +91,7 @@ module RubyPackager
88
91
 
89
92
  # Upload the RDoc on SF.NET
90
93
  def uploadRDocOnSFNET
91
- puts 'Uploading RDoc on SF.NET ...'
94
+ logDebug 'Uploading RDoc on SF.NET ...'
92
95
  # Zip the RDoc
93
96
  lOldDir = Dir.getwd
94
97
  Dir.chdir(@DocDir)
@@ -119,7 +122,7 @@ module RubyPackager
119
122
 
120
123
  # Create the release on SF.NET
121
124
  def createReleaseOnSFNET
122
- puts 'Creating Release on SF.NET ...'
125
+ logDebug 'Creating Release on SF.NET ...'
123
126
  sshWithPassword(
124
127
  'shell.sourceforge.net',
125
128
  @SFLogin,
@@ -130,7 +133,7 @@ module RubyPackager
130
133
  # Upload the generated files on SF.NET
131
134
  def uploadFilesOnSFNET
132
135
  @GeneratedFileNames.each do |iFileName|
133
- puts "Uploading #{iFileName} on SF.NET ..."
136
+ logDebug "Uploading #{iFileName} on SF.NET ..."
134
137
  scpWithPassword(
135
138
  'shell.sourceforge.net',
136
139
  @SFLogin,
@@ -142,14 +145,14 @@ module RubyPackager
142
145
 
143
146
  # Upload the Release note on SF.NET
144
147
  def uploadReleaseNoteOnSFNET
145
- puts 'Uploading Release Note on SF.NET ...'
148
+ logDebug 'Uploading Release Note on SF.NET ...'
146
149
  scpWithPassword(
147
150
  'shell.sourceforge.net',
148
151
  @SFLogin,
149
152
  "#{@DocDir}/ReleaseNote.html",
150
153
  "#{@SFReleaseDir}/ReleaseNote.html"
151
154
  )
152
- puts '!!! DON\'T FORGET to make association between ReleaseNote and Gem in SF.NET'
155
+ logInfo '!!! DON\'T FORGET to make association between ReleaseNote and Gem in SF.NET'
153
156
  end
154
157
 
155
158
  end
@@ -9,14 +9,6 @@ module RubyPackager
9
9
 
10
10
  class Gem
11
11
 
12
- # Check that we can use this installer
13
- #
14
- # Return:
15
- # * _Boolean_: Can we use this installer ?
16
- def checkTools
17
- return true
18
- end
19
-
20
12
  # Create the installer with everything in the release directory.
21
13
  #
22
14
  # Parameters:
@@ -30,6 +22,8 @@ module RubyPackager
30
22
  def createInstaller(iRootDir, iReleaseDir, iInstallerDir, iVersion, iReleaseInfo)
31
23
  rFileName = nil
32
24
 
25
+ lOldDir = Dir.getwd
26
+ Dir.chdir(iReleaseDir)
33
27
  # 1. Generate the gemspec that will build the gem
34
28
  lStrHasRDoc = nil
35
29
  if (iReleaseInfo.GemInfo[:HasRDoc])
@@ -37,12 +31,12 @@ module RubyPackager
37
31
  else
38
32
  lStrHasRDoc = 'false'
39
33
  end
40
- lFilesFilter = "#{iReleaseDir}/**/*"
41
- lStrFiles = "iSpec.files = [ '#{Dir.glob(lFilesFilter).join('\', \'')}' ]"
34
+ # !!! Don't use absolute paths here, otherwise they will be stored in the Gem
35
+ lStrFiles = "iSpec.files = [ '#{Dir.glob('**/*').join('\', \'')}' ]"
42
36
  lStrExtraRDocFiles = ''
43
37
  if ((iReleaseInfo.GemInfo[:ExtraRDocFiles] != nil) and
44
38
  (!iReleaseInfo.GemInfo[:ExtraRDocFiles].empty?))
45
- lStrExtraRDocFiles = "iSpec.extra_rdoc_files = [ '#{@Description[:ExtraRDocFiles].join('\', \'')}' ]"
39
+ lStrExtraRDocFiles = "iSpec.extra_rdoc_files = [ '#{iReleaseInfo.GemInfo[:ExtraRDocFiles].join('\', \'')}' ]"
46
40
  RubyPackager::copyFiles(iRootDir, iReleaseDir, iReleaseInfo.GemInfo[:ExtraRDocFiles])
47
41
  end
48
42
  lGemDepsStrList = []
@@ -64,7 +58,7 @@ module RubyPackager
64
58
  lStrDefaultExecutable = ''
65
59
  if (iReleaseInfo.ExecutableInfo[:StartupRBFile] != nil)
66
60
  lStrBinDir = "iSpec.bindir = '#{File.dirname(iReleaseInfo.ExecutableInfo[:StartupRBFile])}'"
67
- lStrDefaultExecutable = "iSpec.default_executable = '#{File.basename(iReleaseInfo.ExecutableInfo[:StartupRBFile])}'"
61
+ lStrDefaultExecutable = "iSpec.executables = [ '#{File.basename(iReleaseInfo.ExecutableInfo[:StartupRBFile])}' ]"
68
62
  end
69
63
  lGemSpecFileName = 'release.gemspec.rb'
70
64
  File.open(lGemSpecFileName, 'w') do |oFile|
@@ -100,7 +94,7 @@ end
100
94
  rescue ::Gem::SystemExitException
101
95
  # For RubyGems, this is normal behaviour: success results in an exception thrown with exit_code 0.
102
96
  if ($!.exit_code != 0)
103
- puts "!!! RubyGems returned error #{$!.exit_code}."
97
+ logErr "RubyGems returned error #{$!.exit_code}."
104
98
  lGemOK = false
105
99
  end
106
100
  end
@@ -111,6 +105,7 @@ end
111
105
  rFileName = "#{iReleaseInfo.GemInfo[:GemName]}-#{iVersion}.gem"
112
106
  FileUtils::mv(rFileName, "#{iInstallerDir}/#{rFileName}")
113
107
  end
108
+ Dir.chdir(lOldDir)
114
109
 
115
110
  return rFileName
116
111
  end
@@ -48,17 +48,6 @@ module RubyPackager
48
48
  # list< String >
49
49
  attr_reader :TestFiles
50
50
 
51
- # Check if the tools needed for the release are ok
52
- # This is meant to be overriden if needed
53
- #
54
- # Parameters:
55
- # * *iRootDir* (_String_): Root directory from where the release is happening
56
- # Return:
57
- # * _Boolean_: Success ?
58
- def checkTools(iRootDir)
59
- return true
60
- end
61
-
62
51
  # Constructor
63
52
  def initialize
64
53
  # This sets also default values
@@ -131,6 +120,7 @@ module RubyPackager
131
120
  # Parameters:
132
121
  # * *iParams* (<em>map<Symbol,Object></em>): The parameters:
133
122
  # ** *:NSISFileName* (_String_): Name of the NSI file to use to generate the installer
123
+ # ** *:InstallerName* (_String_): Name of the generated installer
134
124
  # Return:
135
125
  # * _ReleaseInfo_: self
136
126
  def install(iParams)