@@ -33,13 +33,14 @@ namespace :gem do
3333 desc "Release gem version #{ GoodData ::VERSION } to rubygems"
3434 task :release do
3535 gem = "gooddata-#{ GoodData ::VERSION } .gem"
36+ origin_license_file = 'LICENSE'
37+ new_license_file = 'LICENSE_FOR_RUBY_SDK_COMPONENT.txt'
3638 notices_file = 'NOTICES.txt'
37-
38- if File . exist? ( notices_file )
39- File . delete ( notices_file )
40- puts "Deleted files: #{ notices_file } "
41- end
42-
39+ File . delete ( origin_license_file ) if File . exist? ( origin_license_file )
40+ File . delete ( notices_file ) if File . exist? ( notices_file )
41+ puts "Deleted files: #{ origin_license_file } and #{ notices_file } "
42+ File . rename ( new_license_file , origin_license_file ) if File . exists? ( new_license_file )
43+ puts "Renamed file #{ new_license_file } to #{ origin_license_file } "
4344 puts "Building #{ gem } ..."
4445 res = `gem build ./gooddata.gemspec`
4546 file = res . match ( 'File: (.*)' ) [ 1 ]
@@ -111,24 +112,6 @@ namespace :license do
111112 puts 'All licenses seem to be OK'
112113 end
113114
114- desc 'Update LICENSE file'
115- task :update do
116- origin_license_file = 'LICENSE'
117- new_license_file = 'LICENSE_FOR_RUBY_SDK_COMPONENT.txt'
118-
119- if File . exist? ( origin_license_file )
120- File . delete ( origin_license_file )
121- puts "Deleted files: #{ origin_license_file } "
122- end
123-
124- if File . exists? ( new_license_file )
125- File . rename ( new_license_file , origin_license_file )
126- puts "Renamed file #{ new_license_file } to #{ origin_license_file } "
127- end
128-
129- puts 'Update LICENSE seem to be OK'
130- end
131-
132115 desc 'Add license header to each file'
133116 task :add do
134117 spec = Gem ::Specification . load ( 'gooddata.gemspec' )
0 commit comments