Minor improvements to Repology workflow and backend (#8801)

This commit is contained in:
Maximilian Downey Twiss
2023-10-20 00:42:21 +11:00
committed by GitHub
parent 883055e2ee
commit 2103e3cdff
2 changed files with 4 additions and 4 deletions

View File

@@ -12,9 +12,8 @@ jobs:
run: |
sudo docker pull satmandu/crewbuild:amd64
sudo docker run -t -v $(pwd):/usr/local/json satmandu/crewbuild:amd64 /bin/bash -c "
git clone https://github.com/chromebrew/chromebrew
cd chromebrew/tools
ruby json.rb
crew update
ruby ../tools/json.rb
cp repology.json /usr/local/json"
- name: Upload JSON arifact
uses: actions/upload-artifact@v3

View File

@@ -10,7 +10,8 @@ output = Array.new
Dir.glob('../packages/*.rb').each do |filename|
pkg = Package.load_package(filename)
output << {name: File.basename(filename, '.rb'), description: pkg.description, homepage: pkg.homepage, version: pkg.version, license: pkg.license, compatibility: pkg.compatibility}
next if pkg.is_fake?
output << {name: File.basename(filename, '.rb').gsub("_","-"), description: pkg.description, homepage: pkg.homepage, version: pkg.version, license: pkg.license, compatibility: pkg.compatibility}
end
File.write('repology.json', JSON.generate(output))