This is an automated email from the ASF dual-hosted git repository.

tison pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/opendal.git


The following commit(s) were added to refs/heads/main by this push:
     new 1db503626 chore: avoid build warning (#6627)
1db503626 is described below

commit 1db503626559b7ccec03f81572a5132b79018e29
Author: tison <[email protected]>
AuthorDate: Wed Oct 8 13:59:27 2025 +0800

    chore: avoid build warning (#6627)
    
    Signed-off-by: tison <[email protected]>
---
 .github/workflows/release_ruby.yml |  4 +++-
 bindings/ruby/.gitignore           |  2 ++
 bindings/ruby/Cargo.toml           |  2 +-
 bindings/ruby/Rakefile             | 29 +++++++++--------------------
 bindings/ruby/core                 |  1 -
 bindings/ruby/opendal.gemspec      |  5 +++++
 6 files changed, 20 insertions(+), 23 deletions(-)

diff --git a/.github/workflows/release_ruby.yml 
b/.github/workflows/release_ruby.yml
index 25bdde914..97003629b 100644
--- a/.github/workflows/release_ruby.yml
+++ b/.github/workflows/release_ruby.yml
@@ -20,7 +20,9 @@ name: Release Ruby Binding
 on:
   push:
     tags:
-      - 'v[0-9]+.[0-9]+.[0-9]+-rc.[0-9]+' # Triggers on version tags (v0.54.0, 
v0.54.0-rc.1, etc.)
+      # Triggers on version tags (v0.54.0, v0.54.0-rc.1, etc.)
+      - 'v[0-9]+.[0-9]+.[0-9]+'
+      - 'v[0-9]+.[0-9]+.[0-9]+-rc.[0-9]+'
   pull_request:
     branches:
       - main
diff --git a/bindings/ruby/.gitignore b/bindings/ruby/.gitignore
index 6661c2f1f..f433fe539 100644
--- a/bindings/ruby/.gitignore
+++ b/bindings/ruby/.gitignore
@@ -10,3 +10,5 @@
 *.so
 Gemfile.lock
 Cargo.lock
+
+/core/
diff --git a/bindings/ruby/Cargo.toml b/bindings/ruby/Cargo.toml
index 867355e24..90a120c0a 100644
--- a/bindings/ruby/Cargo.toml
+++ b/bindings/ruby/Cargo.toml
@@ -36,7 +36,7 @@ name = "opendal_ruby"
 magnus = { version = "0.8", features = ["bytes", "io"] }
 # 1. this crate won't be published, we always use the local version
 # 2. we use the symbolink to allow released gem to find core's source files.
-opendal = { version = ">=0", path = "./core", features = [
+opendal = { version = ">=0", path = "../../core", features = [
   "blocking",
   "layers-throttle",
   # These are default features before v0.46. TODO: change to optional features
diff --git a/bindings/ruby/Rakefile b/bindings/ruby/Rakefile
index f21942d5b..2e707bec5 100644
--- a/bindings/ruby/Rakefile
+++ b/bindings/ruby/Rakefile
@@ -93,33 +93,22 @@ task :version do
   print GEMSPEC.version
 end
 
-desc "Resolve symlinks in core directory for gem packaging" # Read more in 
`.release-ruby.yml`
-task :resolve_symlinks do
-  puts "Changing symlinks in core directory to actual files for packaging..."
-  Dir.chdir("core") do # a symbolic link to OpenDAL core for packaging
-    Dir.glob("**/*", File::FNM_DOTMATCH).each do |file|
-      next unless File.symlink?(file)
-
-      link_target = File.readlink(file)
-      resolved_path = File.expand_path(link_target, File.dirname(file))
-
-      if File.exist?(resolved_path)
-        puts "Resolving symlink: #{file} -> #{link_target}"
-        File.delete(file)
-        FileUtils.cp(resolved_path, file)
-      end
-    end
-  end
+desc "Copy the core directory for gem packaging" # Read more in 
`./.github/workflows/release-ruby.yml`
+task :copy_core do
+  puts "Copy the core directory for packaging..."
+  src = "../../core"
+  dst = "./core"
+  `cp -RL #{src} #{dst}`
 end
 
-# Hook into build task to resolve symlinks first
-Rake::Task["build"].enhance([:resolve_symlinks]) if 
Rake::Task.task_defined?("build")
+# Hook into build task to copy the core directory first
+Rake::Task["build"].enhance([:copy_core]) if Rake::Task.task_defined?("build")
 
 Rake::Task["release"].clear # clear the existing release task to allow override
 Rake::Task["release:rubygem_push"].clear if 
Rake::Task.task_defined?("release:rubygem_push")
 
 # overrides bundler's default rake release task
-# we removed build and git tagging steps. Read more in `.release-ruby.yml`
+# we removed build and git tagging steps. Read more in 
``./.github/workflows/release-ruby.yml`
 # read more 
https://github.com/rubygems/rubygems/blob/master/bundler/lib/bundler/gem_helper.rb
 desc "Multi-arch release"
 task release: [
diff --git a/bindings/ruby/core b/bindings/ruby/core
deleted file mode 120000
index 3d25ddeb2..000000000
--- a/bindings/ruby/core
+++ /dev/null
@@ -1 +0,0 @@
-../../core
\ No newline at end of file
diff --git a/bindings/ruby/opendal.gemspec b/bindings/ruby/opendal.gemspec
index 90d5c9ef1..c1518590b 100644
--- a/bindings/ruby/opendal.gemspec
+++ b/bindings/ruby/opendal.gemspec
@@ -57,6 +57,11 @@ Gem::Specification.new do |spec|
       (File.expand_path(f) == __FILE__) || f.start_with?(*%w[gems/ pkg/ 
target/ tmp/ .git]) || f == "core"
     end
 
+    # Copy core directory
+    src = "../../core"
+    dst = "./core"
+    `cp -RL #{src} #{dst}`
+
     # Include core directory files, excluding symlinks
     core_files = Dir.chdir("./core") do
       `git ls-files -z`.split("\x0").reject do |f|

Reply via email to