Repository: beeware/briefcase

Issue:
LinuxDeploy replaced `VERSION` Environment Variable with `LINUXDEPLOY_OUTPUT_VERSION`
### Describe the bug

LinuxDeploy has [replaced](https://github.com/linuxdeploy/linuxdeploy-plugin-appimage/commit/9aafc9c98f7267b2a5d714ccaee79d52decaf4db) `VERSION` with `LINUXDEPLOY_OUTPUT_VERSION`; I believe this is because one of the AppImage tools uses `VERSION` for something else.

For the time being, `VERSION` will be used as a fallback with the warning below:
```
[appimage/stderr] Warning: please use $LINUXDEPLOY_OUTPUT_VERSION instead of $VERSION
```

### Steps to reproduce

1. Run `briefcase upgrade linuxdeploy`
2. See output from `briefcase build linux appimage`

### Expected behavior

The new setting is used. Setting both avoids the warning.

### Screenshots

_No response_

### Environment

- Operating System: pop os 22.04
- Python version: 3.11.4
- Software versions:
  - Briefcase: `0.3.16.dev11+gede56e67`

### Logs

_No response_

### Additional context

_No response_

Discussion:

Patch:
diff --git a/changes/1361.bugfix.rst b/changes/1361.bugfix.rst
new file mode 100644
index 00000000..168ebb78
--- /dev/null
+++ b/changes/1361.bugfix.rst
@@ -0,0 +1,1 @@
+Appimages builds now use ``LINUXDEPLOY_OUTPUT_VERSION`` rather than ``VERSION`` to inject the version number.
diff --git a/src/briefcase/platforms/linux/appimage.py b/src/briefcase/platforms/linux/appimage.py
index f9916a5f..5af145b2 100644
--- a/src/briefcase/platforms/linux/appimage.py
+++ b/src/briefcase/platforms/linux/appimage.py
@@ -258,7 +258,7 @@ class LinuxAppImageBuildCommand(LinuxAppImageMixin, BuildCommand):
             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,


Test patch:
diff --git a/tests/platforms/linux/appimage/test_build.py b/tests/platforms/linux/appimage/test_build.py
index c2d78db5..617cf9f0 100644
--- a/tests/platforms/linux/appimage/test_build.py
+++ b/tests/platforms/linux/appimage/test_build.py
@@ -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",
@@ -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",
@@ -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",
@@ -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",
@@ -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",
@@ -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",