@@ -120,8 +120,8 @@ protocol and Cassandra Query Language v3.
120120 < api > <%= major %> .<%= minor %> .<%= release %> </ api >
121121 </ version >
122122 < stability >
123- < release > <%= stability %> </ release >
124- < api > <%= stability %> </ api >
123+ < release > <%= release_stability %> </ release >
124+ < api > <%= api_stability %> </ api >
125125 </ stability >
126126 < license uri ="http://www.apache.org/licenses/LICENSE-2.0 "> Apache License 2.0</ license >
127127 < notes >
@@ -173,13 +173,19 @@ end
173173 end
174174
175175 def create_package_xml
176- stability = @stability
177- stability = 'stable' if stability . start_with? ( 'rc' )
176+ if @stability . start_with? ( 'rc' )
177+ api_stability = 'stable'
178+ release_stability = 'beta'
179+ else
180+ api_stability = release_stability = @stability
181+ end
178182
179- unless [ "snapshot" , "devel" , "alpha" , "beta" , "stable" ] . include? ( stability )
180- raise ::ArgumentError ,
181- %[stability must be "snapshot", "devel", "alpha", "beta" or ] +
182- %["stable", #{ stability . inspect } given]
183+ [ api_stability , release_stability ] . each do |stability |
184+ unless [ "snapshot" , "devel" , "alpha" , "beta" , "stable" ] . include? ( stability )
185+ raise ::ArgumentError ,
186+ %[stability must be "snapshot", "devel", "alpha", "beta" or ] +
187+ %["stable", #{ stability . inspect } given]
188+ end
183189 end
184190
185191 File . open ( @dirname + '/ext/package.xml' , 'w+' ) do |f |
0 commit comments