Преглед изворни кода

Add support for revision version for hestia-php and hestia-nginx

+ Update change log
Jaap Marcus пре 4 година
родитељ
комит
21ccb782ca
2 измењених фајлова са 26 додато и 5 уклоњено
  1. 2 0
      CHANGELOG.md
  2. 24 5
      src/hst_autocompile.sh

+ 2 - 0
CHANGELOG.md

@@ -11,6 +11,8 @@ All notable changes to this project will be documented in this file.
 - Fixed an issue where users where not able to download backups via UI (#2335)
 - Fixed an issue where php8.0 got "rounded" to php8 causing default.tpl falling back to 8.1 (#2340)
 - Fixed an issue with recalculating disk usage (#2341)
+- Fixed an issue where php files where still executable in upload folder Wordpress
+- Fixed an bug where version numbers includeing revisions (-x) where unable to build properly
 
 ## [1.5.3] - Service release
 

+ 24 - 5
src/hst_autocompile.sh

@@ -288,11 +288,19 @@ fi
 
 # Generate Links for sourcecode
 HESTIA_ARCHIVE_LINK='https://github.com/hestiacp/hestiacp/archive/'$branch'.tar.gz'
-NGINX='https://nginx.org/download/nginx-'$(echo $NGINX_V |cut -d"~" -f1)'.tar.gz'
+if [[ $NGINX_V =~ - ]]; then
+  NGINX='https://nginx.org/download/nginx-'$(echo $NGINX_V |cut -d"-" -f1)'.tar.gz'
+else
+  NGINX='https://nginx.org/download/nginx-'$(echo $NGINX_V |cut -d"~" -f1)'.tar.gz'
+fi
 OPENSSL='https://www.openssl.org/source/openssl-'$OPENSSL_V'.tar.gz'
 PCRE='https://github.com/PhilipHazel/pcre2/releases/download/pcre2-'$PCRE_V'/pcre2-'$PCRE_V'.tar.gz'
 ZLIB='https://www.zlib.net/zlib-'$ZLIB_V'.tar.gz'
-PHP='http://de2.php.net/distributions/php-'$(echo $PHP_V |cut -d"~" -f1)'.tar.gz'
+if [[ $PHP_V =~ - ]]; then
+ PHP='http://de2.php.net/distributions/php-'$(echo $PHP_V |cut -d"-" -f1)'.tar.gz'
+else
+  PHP='http://de2.php.net/distributions/php-'$(echo $PHP_V |cut -d"~" -f1)'.tar.gz'
+fi
 
 # Forward slashes in branchname are replaced with dashes to match foldername in github archive.
 branch_dash=$(echo "$branch" |sed 's/\//-/g');
@@ -313,8 +321,12 @@ if [ "$NGINX_B" = true ] ; then
     cd $BUILD_DIR
 
     BUILD_DIR_HESTIANGINX=$BUILD_DIR/hestia-nginx_$NGINX_V
-    BUILD_DIR_NGINX=$BUILD_DIR/nginx-$(echo $NGINX_V |cut -d"~" -f1)
-
+    if [[ $NGINX_V =~ - ]]; then
+      BUILD_DIR_NGINX=$BUILD_DIR/nginx-$(echo $NGINX_V |cut -d"-" -f1)
+    else 
+      BUILD_DIR_NGINX=$BUILD_DIR/nginx-$(echo $NGINX_V |cut -d"~" -f1)
+    fi
+    
     if [ "$KEEPBUILD" != 'true' ] || [ ! -d "$BUILD_DIR_HESTIANGINX" ]; then
         # Check if target directory exist
         if [ -d "$BUILD_DIR_HESTIANGINX" ]; then
@@ -456,8 +468,15 @@ if [ "$PHP_B" = true ] ; then
     echo "Building hestia-php package..."
 
     BUILD_DIR_HESTIAPHP=$BUILD_DIR/hestia-php_$PHP_V
+    
     BUILD_DIR_PHP=$BUILD_DIR/php-$(echo $PHP_V |cut -d"~" -f1)
-
+    
+    if [[ $PHP_V =~ - ]]; then
+      BUILD_DIR_PHP=$BUILD_DIR/php-$(echo $PHP_V |cut -d"-" -f1)
+    else
+      BUILD_DIR_PHP=$BUILD_DIR/php-$(echo $PHP_V |cut -d"~" -f1)
+    fi
+    
     if [ "$KEEPBUILD" != 'true' ] || [ ! -d "$BUILD_DIR_HESTIAPHP" ]; then
         # Check if target directory exist
         if [ -d $BUILD_DIR_HESTIAPHP ]; then