mirror of
https://github.com/YunoHost-Apps/gemserv_ynh.git
synced 2024-09-03 18:36:27 +02:00
Fix Upgrade
This commit is contained in:
parent
880047e5d3
commit
333a91748f
2 changed files with 20 additions and 17 deletions
|
@ -87,7 +87,7 @@ chown -R $app:$app "$final_path"
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Making install..."
|
ynh_script_progression --message="Making install..."
|
||||||
|
|
||||||
# Install rustup with the toolchain needed by vaultwarden
|
# Install rustup with the toolchain needed by Gemserv
|
||||||
pushd "$final_path"
|
pushd "$final_path"
|
||||||
ynh_exec_warn_less sudo -u "$app" RUSTUP_HOME="$final_path"/.rustup CARGO_HOME="$final_path"/.cargo bash -c 'curl -sSf -L https://static.rust-lang.org/rustup.sh | sh -s -- -y --default-toolchain nightly'
|
ynh_exec_warn_less sudo -u "$app" RUSTUP_HOME="$final_path"/.rustup CARGO_HOME="$final_path"/.cargo bash -c 'curl -sSf -L https://static.rust-lang.org/rustup.sh | sh -s -- -y --default-toolchain nightly'
|
||||||
popd
|
popd
|
||||||
|
@ -99,7 +99,7 @@ pushd "$final_path"/build
|
||||||
ynh_exec_warn_less sudo -u "$app" env PATH="$PATH" cargo build --release
|
ynh_exec_warn_less sudo -u "$app" env PATH="$PATH" cargo build --release
|
||||||
popd
|
popd
|
||||||
|
|
||||||
# Install vaultwarden
|
# Install Gemserv
|
||||||
cp -af "$final_path/build/target/release/gemserv" "$final_path/live/gemserv"
|
cp -af "$final_path/build/target/release/gemserv" "$final_path/live/gemserv"
|
||||||
|
|
||||||
# Remove build files and rustup
|
# Remove build files and rustup
|
||||||
|
|
|
@ -95,7 +95,9 @@ ynh_install_app_dependencies $pkg_dependencies
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Making install..."
|
ynh_script_progression --message="Making install..."
|
||||||
|
|
||||||
# Install rustup with the toolchain needed by vaultwarden
|
if [ "$upgrade_type" == "UPGRADE_APP" ]
|
||||||
|
then
|
||||||
|
# Install rustup with the toolchain needed by Gemserv
|
||||||
pushd "$final_path"
|
pushd "$final_path"
|
||||||
ynh_exec_warn_less sudo -u "$app" RUSTUP_HOME="$final_path"/.rustup CARGO_HOME="$final_path"/.cargo bash -c 'curl -sSf -L https://static.rust-lang.org/rustup.sh | sh -s -- -y --default-toolchain nightly'
|
ynh_exec_warn_less sudo -u "$app" RUSTUP_HOME="$final_path"/.rustup CARGO_HOME="$final_path"/.cargo bash -c 'curl -sSf -L https://static.rust-lang.org/rustup.sh | sh -s -- -y --default-toolchain nightly'
|
||||||
popd
|
popd
|
||||||
|
@ -107,13 +109,14 @@ pushd "$final_path"/build
|
||||||
ynh_exec_warn_less sudo -u "$app" env PATH="$PATH" cargo build --release
|
ynh_exec_warn_less sudo -u "$app" env PATH="$PATH" cargo build --release
|
||||||
popd
|
popd
|
||||||
|
|
||||||
# Install vaultwarden
|
# Install Gemserv
|
||||||
cp -af "$final_path/build/target/release/gemserv" "$final_path/live/gemserv"
|
cp -af "$final_path/build/target/release/gemserv" "$final_path/live/gemserv"
|
||||||
|
|
||||||
# Remove build files and rustup
|
# Remove build files and rustup
|
||||||
ynh_secure_remove --file="$final_path/build"
|
ynh_secure_remove --file="$final_path/build"
|
||||||
ynh_secure_remove --file="$final_path/.cargo"
|
ynh_secure_remove --file="$final_path/.cargo"
|
||||||
ynh_secure_remove --file="$final_path/.rustup"
|
ynh_secure_remove --file="$final_path/.rustup"
|
||||||
|
fi
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# UPDATE A CONFIG FILE
|
# UPDATE A CONFIG FILE
|
||||||
|
|
Loading…
Reference in a new issue