pkg icon indicating copy to clipboard operation
pkg copied to clipboard

Cannot specify assets in CLI

Open RangerMauve opened this issue 4 years ago • 11 comments

This tool is super useful, thank you for the hard work in putting it together!

It seems that the only way to specify assets is in the package.json, however I need to specify different assets for different platforms (as a result of prebuilt binaries).

Would it be possible to add this as an option? If it's already possible, are there any examples I can add to the docs?

Thank you!

RangerMauve avatar May 27 '21 07:05 RangerMauve

It's not possible to set 'conditional assets' ATM. What I suggest you is to create an sh or nodejs script that handles pkg builds and copies the required assets in a temporary folder based on the arch and add this folder as an asset, once the package process ends

robertsLando avatar May 27 '21 07:05 robertsLando

Thanks for the heads up. I still think that enabling people to specify assets using a --asset flag would be useful, but I've done a workaround in the meantime where I dynamically change the pkg field in the package.json to have different sets of assets based on the build. 😁

My build script: https://github.com/RangerMauve/hyper-gateway/blob/cfd79208ceede44c0a5a1a5f4c1427f53f9987dc/build.js

My package.json setup: https://github.com/RangerMauve/hyper-gateway/blob/cfd79208ceede44c0a5a1a5f4c1427f53f9987dc/package.json#L17

RangerMauve avatar May 27 '21 18:05 RangerMauve

This issue is stale because it has been open 90 days with no activity. Remove the stale label or comment or this will be closed in 5 days. To ignore this issue entirely you can add the no-stale label

github-actions[bot] avatar Aug 26 '21 00:08 github-actions[bot]

This is still something that would be nice to have.

RangerMauve avatar Aug 26 '21 16:08 RangerMauve

This is still something that would be nice to have.

I been trying to pass --assets ./../assets/**/* option through my cli. no wonder why it didn't worked.

Nisthar avatar Oct 01 '21 06:10 Nisthar

This issue is stale because it has been open 90 days with no activity. Remove the stale label or comment or this will be closed in 5 days. To ignore this issue entirely you can add the no-stale label

github-actions[bot] avatar Dec 31 '21 00:12 github-actions[bot]

This is still relevant and would help ease a bunch of pain. 😅

RangerMauve avatar Dec 31 '21 00:12 RangerMauve

This issue is stale because it has been open 90 days with no activity. Remove the stale label or comment or this will be closed in 5 days. To ignore this issue entirely you can add the no-stale label

github-actions[bot] avatar Apr 01 '22 00:04 github-actions[bot]

@RangerMauve PR ?

robertsLando avatar Apr 01 '22 06:04 robertsLando

This issue is stale because it has been open 90 days with no activity. Remove the stale label or comment or this will be closed in 5 days. To ignore this issue entirely you can add the no-stale label

github-actions[bot] avatar Jul 01 '22 00:07 github-actions[bot]

This is still an issue. I've been working around it by modifying the package.json as part of my build script. Sadly haven't had time to do a proper fix.

RangerMauve avatar Jul 01 '22 17:07 RangerMauve

This issue is stale because it has been open 90 days with no activity. Remove the stale label or comment or this will be closed in 5 days. To ignore this issue entirely you can add the no-stale label

github-actions[bot] avatar Sep 30 '22 00:09 github-actions[bot]

Still something that would be nice to have. 😁

RangerMauve avatar Oct 03 '22 00:10 RangerMauve

This issue is stale because it has been open 90 days with no activity. Remove the stale label or comment or this will be closed in 5 days. To ignore this issue entirely you can add the no-stale label

github-actions[bot] avatar Jan 02 '23 00:01 github-actions[bot]

This issue is now closed due to inactivity, you can of course reopen or reference this issue if you see fit.

github-actions[bot] avatar Jan 07 '23 00:01 github-actions[bot]