D
Deno

help

Include platform and version in compiled binary filename

Lleftdev9/13/2023
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
DAHDeno AI Helper9/13/2023
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. 🦕

Looking for more? Join the community!