electron / packager

Customize and package your Electron app with OS-specific bundles (.app, .exe, etc.) via JS or CLI
https://npm.im/@electron/packager
BSD 2-Clause "Simplified" License
132 stars 12 forks source link

Packaging apps for linux does not set correct appVersion #1331

Open mmoraga opened 2 years ago

mmoraga commented 2 years ago

Preflight Checklist

Issue Details

Expected Behavior

Setting the appVersion as an option to electron-packager should set the correct version. Running app.getVersion() should return the same version that has been set during build. This works expectedly on macOS and windows.

Actual Behavior

The packaged app returns 0.0 for app.getVersion()

$ npx electron-packager . --out out test --platform=linux --arch=x64 --app-version=99
Packaging app for platform linux x64 using electron v17.0.0
Wrote new app to out/test-linux-x64
./out/test-linux-x64/test
$ app.getVersion(): 0.0

To Reproduce

clone https://github.com/mmoraga/electron-packager-versions

cd electron-packager-versions
# Install dependencies
npm install
# Build app
npx electron-packager . --out out test --platform=linux --arch=x64 --app-version=99
# Run app
/out/test-linux-x64/test

Additional Information

welcome[bot] commented 2 years ago

👋 Thanks for opening your first issue here! If you have a question about using Electron Packager, read the support docs. If you're reporting a 🐞 bug, please make sure you include steps to reproduce it. Development and issue triage is community-driven, so please be patient and we will get back to you as soon as we can.

To help make it easier for us to investigate your issue, please follow the contributing guidelines.