mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-05-27 11:04:44 +00:00
fix(docuseal): read Ruby version from Gemfile, upgrade on update if needed (#14715)
This commit is contained in:
committed by
GitHub
parent
f9f21c1b79
commit
35cd953ed7
@@ -42,6 +42,13 @@ function update_script() {
|
||||
|
||||
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "docuseal" "docusealco/docuseal" "tarball"
|
||||
|
||||
local required_ruby current_ruby
|
||||
required_ruby=$(grep -m1 '^ruby ' /opt/docuseal/Gemfile | grep -oP '[0-9]+\.[0-9]+\.[0-9]+')
|
||||
current_ruby=$(PATH="/root/.rbenv/bin:/root/.rbenv/shims:${PATH}" rbenv global 2>/dev/null || true)
|
||||
if [[ -n "$required_ruby" && "$required_ruby" != "$current_ruby" ]]; then
|
||||
RUBY_VERSION="${required_ruby}" RUBY_INSTALL_RAILS="false" HOME=/root setup_ruby
|
||||
fi
|
||||
|
||||
msg_info "Restoring Data"
|
||||
mv /opt/docuseal.env.bak /opt/docuseal/.env
|
||||
[[ -d /opt/docuseal_data.bak ]] && mv /opt/docuseal_data.bak /opt/docuseal/data
|
||||
|
||||
Reference in New Issue
Block a user