mirror of https://github.com/itflow-org/itflow
fix for settings_update.php
This commit is contained in:
parent
65c1e7f4b8
commit
0e0a67ef4f
|
|
@ -49,6 +49,10 @@ else
|
||||||
chmod -R 777 /var/www/html
|
chmod -R 777 /var/www/html
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [[-f /var/www/html/settings_update.php ]]; then
|
||||||
|
sed -i "s/\$repo_branch.*';/\$repo_branch = '$ITFLOW_REPO_BRANCH';/g" /var/www/html/settings_update.php
|
||||||
|
fi
|
||||||
|
|
||||||
# Enable the apache2 sites-available
|
# Enable the apache2 sites-available
|
||||||
service apache2 reload
|
service apache2 reload
|
||||||
service apache2 stop
|
service apache2 stop
|
||||||
|
|
|
||||||
|
|
@ -5,9 +5,10 @@ include("database_version.php");
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
//fetch the latest code changes but don't apply them
|
//fetch the latest code changes but don't apply them\
|
||||||
|
$repo_branch = "master";
|
||||||
exec("git fetch", $output, $result);
|
exec("git fetch", $output, $result);
|
||||||
$latest_version = exec("gitrev-parse origin/master");
|
$latest_version = exec("git rev-parse origin/$repo_branch");
|
||||||
$current_version = exec("git rev-parse HEAD");
|
$current_version = exec("git rev-parse HEAD");
|
||||||
|
|
||||||
if($current_version == $latest_version){
|
if($current_version == $latest_version){
|
||||||
|
|
@ -16,7 +17,7 @@ if($current_version == $latest_version){
|
||||||
$update_message = "New Updates are Available [$latest_version]";
|
$update_message = "New Updates are Available [$latest_version]";
|
||||||
}
|
}
|
||||||
|
|
||||||
$git_log = shell_exec("git log master..origin/master --pretty=format:'<tr><td>%h</td><td>%ar</td><td>%s</td></tr>'");
|
$git_log = shell_exec("git log $repo_branch..origin/$repo_branch --pretty=format:'<tr><td>%h</td><td>%ar</td><td>%s</td></tr>'");
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue