From 01188912c652212d7a428d0a85341e0406ed15e0 Mon Sep 17 00:00:00 2001 From: purple Date: Thu, 1 Jun 2023 22:00:02 +0200 Subject: [PATCH] Show current version for a brief moment on /extensions/blueprint --- blueprint.sh | 5 ++++- public/extensions/blueprint/index.html | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/blueprint.sh b/blueprint.sh index 4242df1..ee6788b 100644 --- a/blueprint.sh +++ b/blueprint.sh @@ -18,12 +18,14 @@ fi; if [[ -d "/var/www/$FOLDER/blueprint" ]]; then mv /var/www/$FOLDER/blueprint /var/www/$FOLDER/.blueprint; fi; # BUILT_FROM_SOURCE="y"; # If you downloaded Blueprint from a release instead of building it, this should be "n". -if [[ $BUILT_FROM_SOURCE == "y" ]]; then if [[ ! -f "/var/www/$FOLDER/.blueprint/.storage/versionschemefix.flag" ]]; then sed -E -i "s*&bp.version&*source*g" app/Services/Helpers/BlueprintPlaceholderService.php;touch /var/www/$FOLDER/.blueprint/.storage/versionschemefix.flag;fi;VERSION="source"; +# if [[ $BUILT_FROM_SOURCE == "y" ]]; then if [[ ! -f "/var/www/$FOLDER/.blueprint/.storage/versionschemefix.flag" ]]; then sed -E -i "s*&bp.version&*source*g" app/Services/Helpers/BlueprintPlaceholderService.php;touch /var/www/$FOLDER/.blueprint/.storage/versionschemefix.flag;fi;VERSION="source"; + elif [[ $PM_VERSION == "([(pterodactylmarket""_version)])" ]]; then # This runs when the placeholder has not changed, indicating an issue with PterodactylMarket # or Blueprint being installed from other sources. if [[ ! -f "/var/www/$FOLDER/.blueprint/.storage/versionschemefix.flag" ]]; then sed -E -i "s*&bp.version&*$VER_FALLBACK*g" app/Services/Helpers/BlueprintPlaceholderService.php; + sed -E -i "s*@version*$VER_FALLBACK*g" public/extensions/blueprint/index.html; touch /var/www/$FOLDER/.blueprint/.storage/versionschemefix.flag; fi; @@ -33,6 +35,7 @@ elif [[ $PM_VERSION != "([(pterodactylmarket""_version)])" ]]; then # fallback version. if [[ ! -f "/var/www/$FOLDER/.blueprint/.storage/versionschemefix.flag" ]]; then sed -E -i "s*&bp.version&*$PM_VERSION*g" app/Services/Helpers/BlueprintPlaceholderService.php; + sed -E -i "s*@version*$PM_VERSION*g" public/extensions/blueprint/index.html; touch /var/www/$FOLDER/.blueprint/.storage/versionschemefix.flag; fi; diff --git a/public/extensions/blueprint/index.html b/public/extensions/blueprint/index.html index 64a65cb..2f106f8 100644 --- a/public/extensions/blueprint/index.html +++ b/public/extensions/blueprint/index.html @@ -2,5 +2,5 @@ -

- \ No newline at end of file +

@version

+