chore: Get release's version if needed (#37777)

**/test sanity**



<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **New Features**
- Enhanced script to retrieve and export the Appsmith application
version when using a specific release URL.
- **Bug Fixes**
- Improved error handling and messaging for missing dependencies or
incorrect configurations.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
Shrikant Sharat Kandula 2024-11-27 14:11:20 +05:30 committed by GitHub
parent a16c2ac317
commit 0b1069663e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -86,6 +86,14 @@ if [[ ${backend-} == release ]]; then
backend=https://release.app.appsmith.com backend=https://release.app.appsmith.com
fi fi
if [[ $backend == https://release.app.appsmith.com ]]; then
# If running client against release, we get the release's version and set it up, so we don't see version mismatches.
APPSMITH_VERSION_ID="$(
curl -sS "$backend/info" | grep -Eo '"version": ".+?"' | cut -d\" -f4
)"
export APPSMITH_VERSION_ID
fi
if [[ -z ${run_as-} ]]; then if [[ -z ${run_as-} ]]; then
if type nginx; then if type nginx; then
run_as=nginx run_as=nginx