Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Linux deploy to use LINUXDEPLOY_OUTPUT_VERSION #1373

Merged
merged 3 commits into from
Jul 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changes/1361.bugfix.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Appimages builds now use ``LINUXDEPLOY_OUTPUT_VERSION`` rather than ``VERSION`` to inject the version number.
2 changes: 1 addition & 1 deletion src/briefcase/platforms/linux/appimage.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ def build_app(self, app: AppConfig, **kwargs): # pragma: no-cover-if-is-windows
try:
# For some reason, the version has to be passed in as an
# environment variable, *not* in the configuration.
env["VERSION"] = app.version
env["LINUXDEPLOY_OUTPUT_VERSION"] = app.version
# The internals of the binary aren't inherently visible, so
# there's no need to package copyright files. These files
# appear to be missing by default in the OS dev packages anyway,
Expand Down
12 changes: 6 additions & 6 deletions tests/platforms/linux/appimage/test_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ def test_build_appimage(build_command, first_app, tmp_path, sub_stream_kw):
],
env={
"PATH": "/usr/local/bin:/usr/bin:/path/to/somewhere",
"VERSION": "0.0.1",
"LINUXDEPLOY_OUTPUT_VERSION": "0.0.1",
"DISABLE_COPYRIGHT_FILES_DEPLOYMENT": "1",
"APPIMAGE_EXTRACT_AND_RUN": "1",
"ARCH": "wonky",
Expand Down Expand Up @@ -276,7 +276,7 @@ def test_build_appimage_with_plugin(build_command, first_app, tmp_path, sub_stre
env={
"PATH": f"{gtk_plugin_path.parent}:{app_dir.parent}:/usr/local/bin:/usr/bin:/path/to/somewhere",
"DEPLOY_GTK_VERSION": "3",
"VERSION": "0.0.1",
"LINUXDEPLOY_OUTPUT_VERSION": "0.0.1",
"DISABLE_COPYRIGHT_FILES_DEPLOYMENT": "1",
"APPIMAGE_EXTRACT_AND_RUN": "1",
"ARCH": "wonky",
Expand Down Expand Up @@ -353,7 +353,7 @@ def test_build_failure(build_command, first_app, tmp_path, sub_stream_kw):
],
env={
"PATH": "/usr/local/bin:/usr/bin:/path/to/somewhere",
"VERSION": "0.0.1",
"LINUXDEPLOY_OUTPUT_VERSION": "0.0.1",
"DISABLE_COPYRIGHT_FILES_DEPLOYMENT": "1",
"APPIMAGE_EXTRACT_AND_RUN": "1",
"ARCH": "wonky",
Expand Down Expand Up @@ -416,7 +416,7 @@ def test_build_appimage_in_docker(build_command, first_app, tmp_path, sub_stream
"--volume",
f"{build_command.data_path}:/home/brutus/.cache/briefcase:z",
"--env",
"VERSION=0.0.1",
"LINUXDEPLOY_OUTPUT_VERSION=0.0.1",
"--env",
"DISABLE_COPYRIGHT_FILES_DEPLOYMENT=1",
"--env",
Expand Down Expand Up @@ -540,7 +540,7 @@ def test_build_appimage_with_plugins_in_docker(
":/app:/docker/bin:/docker/sbin"
),
"--env",
"VERSION=0.0.1",
"LINUXDEPLOY_OUTPUT_VERSION=0.0.1",
"--env",
"DISABLE_COPYRIGHT_FILES_DEPLOYMENT=1",
"--env",
Expand Down Expand Up @@ -671,7 +671,7 @@ def test_build_appimage_with_support_package_update(
],
env={
"PATH": "/usr/local/bin:/usr/bin:/path/to/somewhere",
"VERSION": "0.0.1",
"LINUXDEPLOY_OUTPUT_VERSION": "0.0.1",
"DISABLE_COPYRIGHT_FILES_DEPLOYMENT": "1",
"APPIMAGE_EXTRACT_AND_RUN": "1",
"ARCH": "wonky",
Expand Down
Loading