Skip to content

Packaging apps for linux does not set correct appVersion #1331

Open
@mmoraga

Description

@mmoraga

Preflight Checklist

  • I have read the contribution documentation for this project.
  • I agree to follow the code of conduct that this project follows, as appropriate.
  • I have searched the issue tracker for a bug that matches the one I want to file, without success.

Issue Details

  • Electron Packager Version:
    • 15.4.0
  • Electron Version:
    • 16.0.7
  • Operating System:
    • Ubuntu 18.04 x64
    • Fedora 34 x64
  • Last Known Working Electron Packager version::

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions