Skip to content

Commit 5e1ac2e

Browse files
committed
chore: publish generic gem
1 parent bbd666b commit 5e1ac2e

File tree

3 files changed

+22
-0
lines changed

3 files changed

+22
-0
lines changed

MAINTAINERS.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,14 @@ ruby scripts/publish_gems.rb
8989

9090
Repeat these steps for each supported platform.
9191

92+
Afterwards build a generic gem for the `ruby` platform which installs the
93+
extension at install time:
94+
95+
```bash
96+
rake build
97+
gem push pkg/codetracer-ruby-recorder-<version>.gem
98+
```
99+
92100
### Pure Ruby gem
93101

94102
The pure Ruby tracer is packaged from the files under `src/`. Build and

gems/native-tracer/ext/native_tracer/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,3 +54,11 @@ To publish prebuilt binaries:
5454
```
5555

5656
Repeat these steps for each platform to provide platform-specific gems.
57+
58+
After building the platform-specific variants, build a generic gem that
59+
compiles the extension when installed:
60+
61+
```bash
62+
rake build
63+
gem push pkg/codetracer-ruby-recorder-<version>.gem
64+
```

scripts/publish_gems.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,12 @@ def run(cmd, env = {})
2727
FileUtils.rm_f(gem_file)
2828
end
2929

30+
# Build and publish fallback gem for generic Ruby platform
31+
run('rake build')
32+
generic_gem = Dir['pkg/codetracer-ruby-recorder-*.gem'].max_by { |f| File.mtime(f) }
33+
run("gem push #{generic_gem}")
34+
FileUtils.rm_f(generic_gem)
35+
3036
# Build and publish pure Ruby gem
3137
run('gem build gems/pure-ruby-tracer/codetracer_pure_ruby_recorder.gemspec')
3238
pure_gem = Dir['codetracer_pure_ruby_recorder-*.gem'].max_by { |f| File.mtime(f) }

0 commit comments

Comments
 (0)