kevinjqliu commented on PR #2823:
URL: https://github.com/apache/iceberg-rust/pull/2823#issuecomment-4971543057

   thanks for catching this @ankane! Its really important that every crate we 
publish must contain both the license and notice files. 
   
   I've found 2 other crates with the same issue, 3 total:
   - iceberg-storage-opendal
   - iceberg-catalog-loader
   - iceberg-cache-moka
   
   I believe these are all newly added crates. It would be good to add a CI 
check so that we can enforce this invariant. 
   
   Maybe something like:
   ```
   - name: Check published crate legal files
     shell: bash
     run: |
       set -euo pipefail
   
       failed=0
   
       while IFS= read -r crate; do
         echo "Checking ${crate}..."
         files="$(cargo package \
           --package "${crate}" \
           --list \
           --locked)"
   
         for required in LICENSE NOTICE; do
           if ! grep -Fxq "${required}" <<<"${files}"; then
             echo "::error::${crate} package is missing top-level ${required}"
             failed=1
           fi
         done
       done < <(
         cargo metadata --no-deps --format-version 1 |
           jq -r '.packages[] | select(.publish != []) | .name'
       )
   
       exit "${failed}"
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to