Skip to content

Craft should provide info of artifacts found and filtered #417

@mattgauntseo-sentry

Description

@mattgauntseo-sentry

Someone started setting up craft as part of a publishing flow and ran into a number of issues and the latest issue seems to be artifacts being uploaded as .zip files instead of .tgz.

My suspicion is that npm pack <dir> is expected to be used.

The logs hint at this but don't make it clear what we being considered.

[debug] [[target/npm]] Getting artifact list for revision "abc123", filtering options: ***includeNames: /^.*\d\.\d.*\.tgz$/, excludeNames:undefined***
[debug] [[artifact-provider/github]] Fetching artifact list for revision `abc123`.
[debug] [[artifact-provider/github]] Found list in cache.
[debug] [[artifact-provider/github]] Found 18 artifacts.
Error:  Cannot release to NPM: no packages found!

Something along the lines of:

[debug] [[target/npm]] Getting artifact list for revision "abc123", filtering options: 
[debug] [[target/npm]]         includeNames:  /^.*\d\.\d.*\.tgz$/
[debug] [[target/npm]]         excludeNames: undefined
[debug] [[artifact-provider/github]] Fetching artifact list for revision `abc123`.
[debug] [[artifact-provider/github]] Found list in cache.
[debug] [[artifact-provider/github]] Found 18 artifacts.
[debug] [[artifact-provider/github]]     - ❌ ./example-1.zip
[debug] [[artifact-provider/github]]     - ❌ ./example-2.zip
[debug] [[artifact-provider/github]]     - ❌ ./example-3.zip
[debug] [[artifact-provider/github]]     - ❌ ./example-4.zip
[debug] [[artifact-provider/github]]     - ❌ ./example-5.zip
[debug] [[artifact-provider/github]]     - ❌ ....
Error:  Cannot release to NPM: no packages found! Please ensure the file names match the include names.

Lastly if npm has a reasonable expectation of using npm pack, it would be good to call that out in the error.

Metadata

Metadata

Assignees

No one assigned
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions