@@ -33,14 +33,13 @@ 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'
3836 notices_file = 'NOTICES.txt'
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 } "
37+
38+ if File . exist? ( notices_file )
39+ File . delete ( notices_file )
40+ puts "Deleted files: #{ notices_file } "
41+ end
42+
4443 puts "Building #{ gem } ..."
4544 res = `gem build ./gooddata.gemspec`
4645 file = res . match ( 'File: (.*)' ) [ 1 ]
@@ -112,6 +111,24 @@ namespace :license do
112111 puts 'All licenses seem to be OK'
113112 end
114113
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+
115132 desc 'Add license header to each file'
116133 task :add do
117134 spec = Gem ::Specification . load ( 'gooddata.gemspec' )
0 commit comments