You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@opendal.apache.org by ti...@apache.org on 2025/10/07 22:54:01 UTC

(opendal) 01/01: chore: avoid build warning

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

tison pushed a commit to branch avoid-build-warning
in repository https://gitbox.apache.org/repos/asf/opendal.git

commit 03c8e30cb90ff8b6f79e2cfb09d971b507d70658
Author: tison <wa...@gmail.com>
AuthorDate: Wed Oct 8 06:50:16 2025 +0800

    chore: avoid build warning
    
    Signed-off-by: tison <wa...@gmail.com>
---
 .github/workflows/release_ruby.yml |  4 +++-
 bindings/ruby/Cargo.toml           |  2 +-
 bindings/ruby/Rakefile             | 25 ++++++-------------------
 bindings/ruby/core                 |  1 -
 4 files changed, 10 insertions(+), 22 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/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..f8e541d3d 100644
--- a/bindings/ruby/Rakefile
+++ b/bindings/ruby/Rakefile
@@ -93,27 +93,14 @@ 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..."
+  FileUtils.cp_r('../../core', '.')
 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")
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