File tree Expand file tree Collapse file tree 3 files changed +6
-24
lines changed
Expand file tree Collapse file tree 3 files changed +6
-24
lines changed Original file line number Diff line number Diff line change 4141 file_glob : true
4242 tag : ${{ github.ref }}
4343 overwrite : true
44- - name : Generate authority jsons
45- run : pushd ruby; bundle exec rake generate_authority_json; popd
46- - name : Archive json files from the previous step
47- uses : thedoctor0/zip-release@master
48- with :
49- filename : ' auth_json.zip'
50- path : ./auth_json/*.json
51- directory : ./ruby/
52- exclusions : ' *.git*'
53- type : zip
54- - name : Upload artifacts
55- id : upload_auth_json
56- uses : svenstaro/upload-release-action@2.2.1
57- with :
58- repo_token : ${{ secrets.GITHUB_TOKEN }}
59- file : ruby/auth_json.zip
60- file_glob : true
61- tag : ${{ github.ref }}
62- overwrite : true
6344 - name : Generate metadata
6445 run : pushd ruby; bundle exec rake generate_metadata_json; popd
6546 - name : Archive metadata from the previous step
Original file line number Diff line number Diff line change 5757/ruby /visualizations
5858/ruby /json
5959/ruby /vis_json
60+ /ruby /auth_json
6061/ruby /metadata.json
6162/ruby /compiled
6263
Original file line number Diff line number Diff line change @@ -131,18 +131,18 @@ task :generate_authority_json do
131131
132132 %w[ iso icao din ] . each do |auth |
133133 out = Interscript . maps . select do |map_name |
134- / \A #{ auth } -/ . match? map_name
135- end . map do |map_name |
134+ map_name . start_with? " #{ auth } -"
135+ end . sort . map do |map_name |
136136 map = Interscript . parse ( map_name )
137137 tests = map . tests &.data &.first ( 2 ) &.transpose || [ ]
138- lang = map . metadata . data [ :language ] . split ( ':' ) . last
138+ std , lang = map . metadata . data [ :language ] . split ( ':' )
139139
140140 {
141- lang : ( Iso639Data . iso_639_2 [ lang ] || Iso639Data . iso_639_3 [ lang ] ) [ 'eng' ] ,
141+ lang : std . end_with? ( "-3" ) ? Iso639Data . iso_639_3 [ lang ] [ 'Ref_Name' ] : Iso639Data . iso_639_2 [ lang ] [ 'eng' ] ,
142142 isoName : map . metadata . data [ :name ] ,
143143 systemName : map_name ,
144144 samples : tests [ 0 ] || [ ] ,
145- english : tests [ 1 ] || [ ] ,
145+ english : [ ] ,
146146 result : [ ]
147147 }
148148 end
You can’t perform that action at this time.
0 commit comments