File tree Expand file tree Collapse file tree 3 files changed +22
-7
lines changed Expand file tree Collapse file tree 3 files changed +22
-7
lines changed Original file line number Diff line number Diff line change @@ -64,6 +64,10 @@ A helper script is available to build and push all gems in one go:
6464ruby scripts/publish_gems.rb
6565```
6666
67+ The list of target triples used by the script lives in
68+ ` scripts/targets.txt ` . You can override it by passing targets as
69+ arguments to the helper script.
70+
6771### Native extension gem
6872
69731 . Install the development dependencies:
Original file line number Diff line number Diff line change 33
44require 'fileutils'
55
6- TARGETS = [
7- 'x86_64-unknown-linux-gnu' ,
8- 'aarch64-unknown-linux-gnu' ,
9- 'x86_64-apple-darwin' ,
10- 'aarch64-apple-darwin' ,
11- 'x86_64-pc-windows-msvc'
12- ] . freeze
6+ def load_targets
7+ return ARGV unless ARGV . empty?
138
9+ config_path = File . join ( __dir__ , 'targets.txt' )
10+ unless File . exist? ( config_path )
11+ abort ( "No targets specified and #{ config_path } is missing" )
12+ end
13+
14+ File . readlines ( config_path , chomp : true )
15+ . map { |l | l . strip }
16+ . reject { |l | l . empty? || l . start_with? ( '#' ) }
17+ end
18+
19+ TARGETS = load_targets . freeze
1420
1521def run ( cmd , env = { } )
1622 command = env . map { |k , v | "#{ k } =#{ v } " } . join ( ' ' )
Original file line number Diff line number Diff line change 1+ x86_64-unknown-linux-gnu
2+ aarch64-unknown-linux-gnu
3+ x86_64-apple-darwin
4+ aarch64-apple-darwin
5+ x86_64-pc-windows-msvc
You can’t perform that action at this time.
0 commit comments