diff --git a/CHANGELOG.md b/CHANGELOG.md index 6cfd244..eb00987 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [0.3.2] +### Changed +- Support broader range of MacOS systems with prebuild binaries +- Cleanup default prebuild binaries after gem installation to reduce used disc space + ## [0.3.1] ### Changed - Package pre-build binaries together diff --git a/README.md b/README.md index a1f868d..4b12baf 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,8 @@ Currently during heavy development. ## Installation +> **NOTE**: Compilation requires openssl-dev / openssl-devel package + Add this line to your application's Gemfile: ```ruby diff --git a/Rakefile b/Rakefile index f2ef554..e6bd12e 100644 --- a/Rakefile +++ b/Rakefile @@ -18,9 +18,11 @@ task build: ["thermite:build"] do next end - puts "Make #{thermite.config.ruby_extension_path} a #{Gem::Platform.local} default implementation" + platform = "#{Gem::Platform.local.cpu}-#{Gem::Platform.local.os}" + + puts "Make #{thermite.config.ruby_extension_path} a #{platform} default implementation" FileUtils.cp(thermite.config.ruby_extension_path, - "#{thermite.config.ruby_extension_path}.#{Gem::Platform.local}.default") + "#{thermite.config.ruby_extension_path}.#{platform}.default") end task default: %i[build thermite:test spec rubocop] diff --git a/ext/Rakefile b/ext/Rakefile index 3524cb5..db13c65 100644 --- a/ext/Rakefile +++ b/ext/Rakefile @@ -8,10 +8,19 @@ thermite = Thermite::Tasks.new(cargo_project_path: project_dir, ruby_project_path: project_dir, optional_rust_extension: true) -namespace :thermite do +namespace :thermite do # rubocop:disable Metrics/BlockLength + desc "Clean up default binaries" + task :clean_binnaries do + puts "Cleaning up" + Dir["#{thermite.config.ruby_extension_path}.*.default"].each do |file| + FileUtils.rm(file) + end + end + desc "Try to build extension if cargo is available or setup default lib" task :build_or_default do - default_ext_path = "#{thermite.config.ruby_extension_path}.#{Gem::Platform.local}.default" + platform = "#{Gem::Platform.local.cpu}-#{Gem::Platform.local.os}" + default_ext_path = "#{thermite.config.ruby_extension_path}.#{platform}.default" if thermite.cargo profile = ENV.fetch("CARGO_PROFILE", "release") @@ -39,4 +48,4 @@ namespace :thermite do end end -task default: %w[thermite:build_or_default thermite:cargo_clean] +task default: %w[thermite:build_or_default thermite:cargo_clean thermite:clean_binnaries] diff --git a/lib/rusty_json_schema/version.rb b/lib/rusty_json_schema/version.rb index f9d43a4..c55362c 100644 --- a/lib/rusty_json_schema/version.rb +++ b/lib/rusty_json_schema/version.rb @@ -2,6 +2,6 @@ module RustyJSONSchema - VERSION = "0.3.1" + VERSION = "0.3.2" end