-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathRakefile
43 lines (34 loc) · 1010 Bytes
/
Rakefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
$LOAD_PATH << 'lib'
require 'suse/connect'
require 'rspec/core/rake_task'
task :default => [:spec, :rubocop]
desc 'Run console loaded with gem'
task :console do
require 'irb'
ARGV.clear
IRB.start
end
desc 'Run Rubocop'
task :rubocop do
sh 'bundle exec rubocop -c .rubocop.yml'
end
desc 'increase version of a gem'
task :bump do
sh 'gem bump --no-commit'
end
desc 'Run RSpec'
RSpec::Core::RakeTask.new(:spec)
desc 'build locally (prepare for pushing to ibs)'
task :build => [:default] do
def gemfilename
"suse-connect-#{SUSE::Connect::VERSION}.gem"
end
sh 'rm *gem' if Dir['*.gem'].any?
sh 'rm package/*gem' if Dir['package/*.gem'].any?
sh 'gem build suse-connect.gemspec'
sh "mv #{gemfilename} package/"
Dir.chdir('package')
sh "gem2rpm -l -o SUSEConnect.spec -t SUSEConnect.spec.erb #{gemfilename}"
sh 'ronn --roff --manual SUSEConnect --pipe ../README.md > SUSEConnect.1 && gzip -f SUSEConnect.1'
sh 'osc -A https://api.suse.de build SLE_12 x86_64 --no-verify'
end