Skip to content
This repository has been archived by the owner on Jun 8, 2018. It is now read-only.

Commit

Permalink
Added rollback feature, close #12
Browse files Browse the repository at this point in the history
  • Loading branch information
dylangallin committed Feb 22, 2018
1 parent acb2289 commit 39988f9
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 3 deletions.
8 changes: 7 additions & 1 deletion deployNewVersion.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
<fieldset>
<legend>Deploy new version</legend>
<div>
<label for="branch">Branch</label>
<label for="branch">Branch</label>
<div>
<input id="branch" name="branch" type="text" placeholder="Branch">
</div>
Expand All @@ -49,6 +49,12 @@
</div>
</fieldset>
</form>
<fieldset>
<legend>Rollback version</legend>
<div>
<a href="./rollbackVersion.php">Rollback</a>
</div>
</fieldset>
</div>
<?php include("./includes/footer.php"); ?>
</body>
Expand Down
5 changes: 5 additions & 0 deletions rollbackPanel.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?php
$output = shell_exec(dirname(__DIR__) . '/deploy.sh --panel-rollback 2>&1');
header('refresh:5;url=./updatePanel.php');
echo $output;
?>
5 changes: 5 additions & 0 deletions rollbackVersion.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?php
$output = shell_exec(dirname(__DIR__) . '/deploy.sh --release-rollback 2>&1');
header('refresh:5;url=./deployNewVersion.php');
echo $output;
?>
10 changes: 8 additions & 2 deletions updatePanel.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,17 +38,23 @@
<fieldset>
<legend>Update Admin panel</legend>
<div>
<label for="branch">Branch</label>
<label for="branch">Branch</label>
<div>
<input id="branch" name="branch" type="text" placeholder="Branch">
</div>
</div>
<div>
<button type="submit" id="updatePanelButton" name="updatePanelButton">Update</button>
<a href="/panel">Get back to the panel</a>
<a href="/panel">Get back to the panel</a>
</div>
</fieldset>
</form>
<fieldset>
<legend>Rollback admin panel</legend>
<div>
<a href="./rollbackPanel.php">Rollback</a>
</div>
</fieldset>
</div>
<?php include("./includes/footer.php"); ?>
</body>
Expand Down

0 comments on commit 39988f9

Please sign in to comment.