mirror of https://github.com/itflow-org/itflow
Fix Update
This commit is contained in:
parent
02445811fa
commit
a17fbcfc1d
|
|
@ -34,7 +34,7 @@ $git_log = shell_exec("git log $repo_branch..origin/$repo_branch --pretty=format
|
|||
|
||||
<?php if (!empty($git_log)) { ?>
|
||||
<a class="btn btn-primary btn-lg my-4" href="post.php?update"><i class="fas fa-fw fa-4x fa-download mb-1"></i><h5>Update App</h5></a>
|
||||
<a class="btn btn-primary" href="post.php?update&force_update=1"><i class="fas fa-fw fa-4x fa-download mb-1"></i><h5>FORCE Update App</h5></a>
|
||||
<a class="btn btn-danger" href="post.php?update&force_update=1"><i class="fas fa-fw fa-4x fa-hammer mb-1"></i><h5>FORCE Update App</h5></a>
|
||||
<hr>
|
||||
|
||||
<?php } else {
|
||||
|
|
|
|||
|
|
@ -764,7 +764,7 @@ if (isset($_GET['update'])) {
|
|||
|
||||
//git fetch downloads the latest from remote without trying to merge or rebase anything. Then the git reset resets the master branch to what you just fetched. The --hard option changes all the files in your working tree to match the files in origin/master
|
||||
|
||||
if(isset($_GET['force_update'] == 1)) {
|
||||
if(isset($_GET['force_update']) == 1) {
|
||||
exec("git fetch --all");
|
||||
exec("git reset --hard origin/master");
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Reference in New Issue