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

Commit

Permalink
Merge pull request #14 from muonium/deploy_branch
Browse files Browse the repository at this point in the history
Deploy branch
  • Loading branch information
dylangallin committed Feb 16, 2018
2 parents 23a2b76 + c7c8212 commit acb2289
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
9 changes: 8 additions & 1 deletion deployNewVersion.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?php
if(!empty($_POST)) {
$output = shell_exec(dirname(__DIR__) . '/deploy.sh --release 2>&1');
$branch = $_POST['branch'];
$output = shell_exec(dirname(__DIR__) . '/deploy.sh --release "'.$branch.'" 2>&1');
$error = $output;
$message = "New version deployed.";
}
Expand Down Expand Up @@ -36,6 +37,12 @@
<form action="./deployNewVersion.php" method="post">
<fieldset>
<legend>Deploy new version</legend>
<div>
<label for="branch">Branch</label>
<div>
<input id="branch" name="branch" type="text" placeholder="Branch">
</div>
</div>
<div>
<button type="submit" id="deployButton" name="deployButton">Deploy</button>
<a href="/panel">Get back to the panel</a>
Expand Down
9 changes: 8 additions & 1 deletion updatePanel.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?php
if(!empty($_POST)) {
$output = shell_exec(dirname(__DIR__) . '/deploy.sh --panel 2>&1');
$branch = $_POST['branch'];
$output = shell_exec(dirname(__DIR__) . '/deploy.sh --panel "'.$branch.'" 2>&1');
$error = $output;
$message = "New version of admin panel deployed.";
}
Expand Down Expand Up @@ -36,6 +37,12 @@
<form action="./updatePanel.php" method="post">
<fieldset>
<legend>Update Admin panel</legend>
<div>
<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>
Expand Down

0 comments on commit acb2289

Please sign in to comment.