diff --git a/.github/osia_get_links.rb b/.github/osia_get_links.rb new file mode 100644 index 00000000..5c379346 --- /dev/null +++ b/.github/osia_get_links.rb @@ -0,0 +1,18 @@ +require_relative 'osia_helper' + +OUTPUT = 'temp-links' + +def apps_archived(apps) + a = apps.select {|a| a['tags'] != nil }.select {|b| b['tags'].include?'archive'} + a.sort_by { |k, v| k['title'] } +end + +j = get_json +a = j['projects'] +archived = apps_archived a +links = a.reject { |x| archived.include? x }.map { |y| y['source']} + +links.each_with_index { |z, i| puts "#{i+1} #{z}"} + +puts "Writing #{OUTPUT}" +File.open(OUTPUT, 'w') { |f| f.puts links } diff --git a/circle.yml b/circle.yml index f1833529..bea24ad3 100644 --- a/circle.yml +++ b/circle.yml @@ -6,12 +6,14 @@ test: - gem install awesome_bot - sudo pip install json-spec override: - - awesome_bot contents.json -a 403 -w developer.apple,preyproject,xbmc/xbmc,wheelmap.org + - ruby .github/osia_get_links.rb + - awesome_bot temp-links -a 403 -w xbmc/xbmc,wheelmap.org - json validate --schema-file=.github/schema.json --document-file=contents.json - ruby .github/osia_validate_categories.rb general: artifacts: - - "ab-results-contents.json.json" + - "temp-links" + - "ab-results-temp-links.json" deployment: master: branch: master