mirror of
https://github.com/NNTmux/newznab-tmux.git
synced 2026-08-28 17:01:16 +00:00
Update scripts
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
2016-04-25 DariusIII
|
||||
* Upd: Update scripts
|
||||
2016-04-25 DariusIII
|
||||
* Upd: Update composer files, remove extra not needed scripts, update Gentele and baseadminpage
|
||||
* Fix: Add missing files to shared folder for admin theme
|
||||
|
||||
@@ -29,14 +29,14 @@ use \newznab\db\DbUpdate;
|
||||
|
||||
/**
|
||||
* Update various aspects of your indexer.
|
||||
|
||||
*
|
||||
* Actions:
|
||||
* * all|nntmux Fetches current git repo, composer dependencies, and update latest Db patches.
|
||||
* * all|nzedb Fetches current git repo, composer dependencies, and update latest Db patches.
|
||||
* * db Update the Db with any patches not yet applied.
|
||||
* * git Performs git pull.
|
||||
|
||||
*
|
||||
*@package app\extensions\command
|
||||
* * predb Fetch and import TSV files into the predb table.
|
||||
*
|
||||
*@package app\extensions\command
|
||||
*/
|
||||
class Update extends \app\extensions\console\Command
|
||||
{
|
||||
@@ -119,6 +119,14 @@ class Update extends \app\extensions\console\Command
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Import/Update the predb table using tab separated value files.
|
||||
*/
|
||||
public function predb()
|
||||
{
|
||||
$this->error('predb not available yet!');
|
||||
}
|
||||
|
||||
public function run($command = null)
|
||||
{
|
||||
if (!$command || !$this->request->args()) {
|
||||
@@ -138,6 +146,12 @@ class Update extends \app\extensions\console\Command
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Issues the command to 'install' the composer package.
|
||||
*
|
||||
* It first checks the current branch for stable versions. If found then the '--no-dev'
|
||||
* option is added to the command to prevent development packages being also downloded.
|
||||
*/
|
||||
protected function composer()
|
||||
{
|
||||
$this->initialiseGit();
|
||||
|
||||
@@ -85,8 +85,9 @@ class Version extends \app\extensions\console\Command
|
||||
if (!$this->plain) {
|
||||
$this->primary('Looking up Git tag version(s)');
|
||||
}
|
||||
$this->out("XML version: " . $this->versions->getGitTagFromFile());
|
||||
$this->out("Git version: " . $this->versions->getGitTagFromRepo());
|
||||
$this->out('Hash: ' . $this->versions->getGitHeadHash(), 0);
|
||||
$this->out('XML version: ' . $this->versions->getGitTagFromFile());
|
||||
$this->out('Git version: ' . $this->versions->getGitTagFromRepo());
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -88,6 +88,11 @@ class Git extends \lithium\core\Object
|
||||
return $this->_config['branches']['stable'];
|
||||
}
|
||||
|
||||
public function getHeadHash()
|
||||
{
|
||||
return $this->run('rev-parse HEAD');
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine if the supplied object is commited to the repository or not.
|
||||
*
|
||||
|
||||
@@ -42,6 +42,12 @@ class Versions extends \lithium\core\Object
|
||||
parent::__construct($config += $defaults);
|
||||
}
|
||||
|
||||
public function getGitHeadHash()
|
||||
{
|
||||
$this->initialiseGit();
|
||||
return $this->git->getHeadHash();
|
||||
}
|
||||
|
||||
public function getGitTagFromFile()
|
||||
{
|
||||
$this->loadXMLFile();
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
* @author niel
|
||||
* @copyright 2014 nZEDb
|
||||
*/
|
||||
require_once dirname(__FILE__) . '/../../../www/config.php';
|
||||
require_once dirname(dirname(dirname(__DIR__))) . DIRECTORY_SEPARATOR . 'indexer.php';
|
||||
|
||||
use newznab\db\Settings;
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
* @author niel
|
||||
* @copyright 2014 nZEDb
|
||||
*/
|
||||
require_once dirname(__FILE__) . '/../../../www/config.php';
|
||||
require_once dirname(dirname(dirname(__DIR__))) . DIRECTORY_SEPARATOR . 'indexer.php';
|
||||
|
||||
use newznab\db\Settings;
|
||||
|
||||
@@ -41,4 +41,4 @@ if ($tables instanceof \Traversable) {
|
||||
echo 'All done!' . PHP_EOL;
|
||||
}
|
||||
|
||||
?>
|
||||
?>
|
||||
|
||||
@@ -25,8 +25,7 @@ if (!isset($argv[1]) || !in_array($argv[1], ['1'])) {
|
||||
'1: 2014-07-28: Add unique key to binaryhash to be able to do multiple updates in 1 statement.' . PHP_EOL
|
||||
);
|
||||
}
|
||||
|
||||
require_once dirname(__FILE__) . '/../../../www/config.php';
|
||||
require_once dirname(dirname(dirname(__DIR__))) . DIRECTORY_SEPARATOR . 'indexer.php';
|
||||
|
||||
use newznab\db\Settings;
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
* @author niel
|
||||
* @copyright 2014 nZEDb
|
||||
*/
|
||||
require_once dirname(__FILE__) . '/../../../www/config.php';
|
||||
require_once dirname(dirname(dirname(__DIR__))) . DIRECTORY_SEPARATOR . 'indexer.php';
|
||||
|
||||
use newznab\db\Settings;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user