Class: Cibuildgem::CLI
- Inherits:
-
Thor
- Object
- Thor
- Cibuildgem::CLI
- Includes:
- Thor::Actions
- Defined in:
- lib/cibuildgem/cli.rb
Class Method Summary collapse
Instance Method Summary collapse
- #ci_template ⇒ Object
- #clean ⇒ Object
- #clobber ⇒ Object
- #compile ⇒ Object
- #copy_from_staging_to_lib ⇒ Object
- #package ⇒ Object
- #print_normalized_platform ⇒ Object
- #print_ruby_cc_version ⇒ Object
- #release ⇒ Object
- #test ⇒ Object
Class Method Details
.exit_on_failure? ⇒ Boolean
13 14 15 |
# File 'lib/cibuildgem/cli.rb', line 13 def exit_on_failure? true end |
Instance Method Details
#ci_template ⇒ Object
96 97 98 99 100 101 102 103 104 105 |
# File 'lib/cibuildgem/cli.rb', line 96 def ci_template ruby_requirements = compilation_task.gemspec.required_ruby_version # os = ["macos-latest", "macos-15-intel", "ubuntu-latest", "windows-latest"] @os = ["macos-latest", "ubuntu-22.04"] # Just this for now because the CI takes too long otherwise. @latest_supported_ruby_version = RubySeries.latest_version_for_requirements(ruby_requirements) @runtime_version_for_compilation = RubySeries.runtime_version_for_compilation(ruby_requirements) @ruby_versions_for_testing = RubySeries.versions_to_test_against(ruby_requirements) directory("github", ".github", context: instance_eval("binding")) end |
#clean ⇒ Object
72 73 74 |
# File 'lib/cibuildgem/cli.rb', line 72 def clean run_rake_tasks!("cibuildgem:setup", :clean) end |
#clobber ⇒ Object
83 84 85 |
# File 'lib/cibuildgem/cli.rb', line 83 def clobber run_rake_tasks!("cibuildgem:setup", :clobber) end |
#compile ⇒ Object
29 30 31 |
# File 'lib/cibuildgem/cli.rb', line 29 def compile run_rake_tasks!("cibuildgem:setup", :compile) end |
#copy_from_staging_to_lib ⇒ Object
61 62 63 |
# File 'lib/cibuildgem/cli.rb', line 61 def copy_from_staging_to_lib run_rake_tasks!("cibuildgem:setup", "copy:stage:lib") end |
#package ⇒ Object
46 47 48 49 50 |
# File 'lib/cibuildgem/cli.rb', line 46 def package ENV["RUBY_CC_VERSION"] ||= compilation_task.ruby_cc_version run_rake_tasks!("cibuildgem:setup", :cross, :native, :gem) end |
#print_normalized_platform ⇒ Object
125 126 127 |
# File 'lib/cibuildgem/cli.rb', line 125 def print_normalized_platform print(compilation_task.normalized_platform) end |
#print_ruby_cc_version ⇒ Object
120 121 122 |
# File 'lib/cibuildgem/cli.rb', line 120 def print_ruby_cc_version print(compilation_task.ruby_cc_version) end |
#release ⇒ Object
109 110 111 112 113 114 115 116 |
# File 'lib/cibuildgem/cli.rb', line 109 def release Dir.glob([:glob]).each do |file| pathname = Pathname(file) next if pathname.directory? || pathname.extname != ".gem" Kernel.system("gem push #{file}", exception: true) end end |
#test ⇒ Object
56 57 58 |
# File 'lib/cibuildgem/cli.rb', line 56 def test run_rake_tasks!(:test) end |