leftdev
leftdev•16mo ago

Include platform and version in compiled binary filename

Right now when i run deno compile --output bin/myprogram, it works as expected. Is is possible to save the filename by the package.json (or is there anywhere else i should put the version?) in the output filename? (e.g bin/myprogram_2.0.0). thanks
1 Reply
Deno AI Helper
Deno AI Helper•16mo ago
The deno compile command does not currently support using a version number from a package.json file or any other file to name the output binary. The --output flag of the deno compile command only accepts a string that represents the path to the output binary file. However, you could potentially use a shell script or another method to read the version number from your package.json file and then include that in the deno compile command. Please note that this is not explicitly supported by the Deno documentation and you would need to implement this yourself. 🦕

Did you find this page helpful?