Skip to content

Commit

Permalink
Enforce uniqueness of package names
Browse files Browse the repository at this point in the history
  • Loading branch information
thriqon committed Jan 18, 2016
1 parent c6a2e9f commit 74478d8
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions generate_lists.lua
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,15 @@ inv.task('main:fetch_images_dir_from_github')
.using(curl)
.run('https://api.github.com/repos/' .. github_repo .. '/contents/_images', '-o', 'data/github_repo')

inv.task('main:check_uniqueness_of_keys')
.using('busybox')
.run('/bin/sh', '-c',
"cat packages.tsv | cut -f2 |" -- read in all package names
.. "sort | uniq -d |" -- filter out non-duplicates
.. "wc -l | xargs -I%% test 0 -eq %% || (echo 'Package names not unique' 1>&2 && false)") -- count number of non-duplicates and assert that there are zero of them

inv.task('main:prepare')
.runTask('main:check_uniqueness_of_keys')
.runTask('main:create_data_dir')
.runTask('main:generate_jq_image')
.runTask('main:load_versions_from_quay')
Expand Down

0 comments on commit 74478d8

Please sign in to comment.