-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
70efcf7
commit 7a8856c
Showing
3 changed files
with
25 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
web: vendor/bin/heroku-php-apache2 public/ | ||
release: php release.php |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<?php | ||
|
||
include('vendor/autoload.php'); | ||
$userlog = make_logger('release'); | ||
initdb(); | ||
|
||
if(empty(getenv('APP_NAME')) || empty(getenv('BASE_URL')) || !defined('DB_SETUP')) { | ||
$userlog->error("Unable to release without APP_NAME, BASE_URL and valid DB_ ENV"); | ||
exit(-1); | ||
} | ||
try { | ||
installDB(); | ||
} catch(\Exception $e) { | ||
$userlog->error( | ||
'Schema restore / migration failed' | ||
); | ||
exit(-1); | ||
} | ||
$userlog->info('Release success'); | ||
exit(0); |