When manually installind scrcpy 2.0, the script downloads 1.25 server
Environment
- OS: Ubuntu 22.04
- scrcpy version: 2.0
- installation method: Manual build from 2.0 release zip
- device model: n/a
- Android version: n/a
Describe the bug
When running the install_release.sh for the 2.0 zip it downloads an older version of scrcpy-server.
❯ ./install_release.sh
[scrcpy] Downloading prebuilt server...
--2023-04-07 15:00:21-- https://github.com/Genymobile/scrcpy/releases/download/v1.25/scrcpy-server-v1.25
Resolving github.com (github.com)... 140.82.113.4
Connecting to github.com (github.com)|140.82.113.4|:443... connected.
HTTP request sent, awaiting response... 302 Found
...
To use ./install_release.sh, you must not checkout the tag v2.0, but at least the commit after (https://github.com/Genymobile/scrcpy/commit/abc1be4872ee1869b307405b091d736b7cd2e0ff). Or you should just checkout master (which is always compatible with the latest server release, the development is on the dev branch).
The reason is that the release is built from a specific tag (here v2.0), which produces files that are uploaded and referenced from the install_release.sh script, with their SHA-256 sum, so the script is updated afterwards.
In theory, since install_release.sh does not impact the build (so it won't change the SHA-256), I could tag v2.0, build, then add a commit for install_release.sh and rewrite the tag, but that's a bit hacky.