Skip to content

Firefly III: a personal finances manager

New GitHub move repository instructions

James Cole39917b77c153
diff --git a/app/Console/Commands/MoveRepository.php b/app/Console/Commands/MoveRepository.php
new file mode 100644
index 0000000000..51d170d7c3
--- /dev/null
+++ b/app/Console/Commands/MoveRepository.php
@@ -0,0 +1,86 @@
+<?php
+/**
+ * MoveRepository.php
+ * Copyright (C) 2016 [email protected]
+ *
+ * This software may be modified and distributed under the terms of the
+ * Creative Commons Attribution-ShareAlike 4.0 International License.
+ *
+ * See the LICENSE file for details.
+ */
+
+declare(strict_types = 1);
+
+namespace FireflyIII\Console\Commands;
+
+use Carbon\Carbon;
+use Illuminate\Console\Command;
+
+/**
+ * Class MoveRepository
+ *
+ * @package FireflyIII\Console\Commands
+ */
+class MoveRepository extends Command
+{
+ /**
+ * The console command description.
+ *
+ * @var string
+ */
+ protected $description = 'Alerts the user that the Github repository will move, if they are interested to know this.';
+ /**
+ * The name and signature of the console command.
+ *
+ * @var string
+ */
+ protected $signature = 'firefly:github-move';
+
+ /**
+ * Create a new command instance.
+ *
+ */
+ public function __construct()
+ {
+ parent::__construct();
+ }
+
+ /**
+ * Execute the console command.
+ */
+ public function handle()
+ {
+ $moveDate = new Carbon('2017-01-01');
+ $final = new Carbon('2017-03-01');
+ $now = new Carbon;
+
+ // display message before 2017-01-01
+ if ($moveDate > $now) {
+ $this->line('+------------------------------------------------------------------------------+');
+ $this->line('');
+ $this->line('The Github repository for Firefly III will MOVE');
+ $this->line('This move will be on January 1st 2017');
+ $this->line('');
+ $this->error('READ THIS WIKI PAGE FOR MORE INFORMATION');
+ $this->line('');
+ $this->info('https://github.com/firefly-iii/help/wiki/New-Github-repository');
+ $this->line('');
+ $this->line('+------------------------------------------------------------------------------+');
+ }
+
+ // display message after 2017-01-01 but before 2017-03-01
+ if ($moveDate <= $now && $now <= $final) {
+ $this->line('+------------------------------------------------------------------------------+');
+ $this->line('');
+ $this->line('The Github repository for Firefly III has MOVED');
+ $this->line('This move was on January 1st 2017!');
+ $this->line('');
+ $this->error('READ THIS WIKI PAGE FOR MORE INFORMATION');
+ $this->line('');
+ $this->info('https://github.com/firefly-iii/help/wiki/New-Github-repository');
+ $this->line('');
+ $this->line('+------------------------------------------------------------------------------+');
+ }
+
+ }
+}
diff --git a/app/Console/Commands/UpgradeFireflyInstructions.php b/app/Console/Commands/UpgradeFireflyInstructions.php
index 2a4a801ade..234b075f7a 100644
--- a/app/Console/Commands/UpgradeFireflyInstructions.php
+++ b/app/Console/Commands/UpgradeFireflyInstructions.php
@@ -63,21 +63,21 @@ class UpgradeFireflyInstructions extends Command
}
- $this->line('+------------------------------------------------------------------------------+');
- $this->line('');
+
if (is_null($text)) {
$this->line('Thank you for installing Firefly III, v' . $version);
$this->info('There are no extra upgrade instructions.');
$this->line('Firefly III should be ready for use.');
} else {
+ $this->line('+------------------------------------------------------------------------------+');
+ $this->line('');
$this->line('Thank you for installing Firefly III, v' . $version);
- $this->line('If you are upgrading from a previous version,');
- $this->line('please follow these upgrade instructions carefully:');
$this->info(wordwrap($text));
+ $this->line('');
+ $this->line('+------------------------------------------------------------------------------+');
}
- $this->line('');
- $this->line('+------------------------------------------------------------------------------+');
+
}
}
diff --git a/app/Console/Kernel.php b/app/Console/Kernel.php
index d62f5371ca..7c9c52fc01 100755
--- a/app/Console/Kernel.php
+++ b/app/Console/Kernel.php
@@ -16,6 +16,7 @@ namespace FireflyIII\Console;
use FireflyIII\Console\Commands\CreateImport;
use FireflyIII\Console\Commands\EncryptFile;
use FireflyIII\Console\Commands\Import;
+use FireflyIII\Console\Commands\MoveRepository;
use FireflyIII\Console\Commands\ScanAttachments;
use FireflyIII\Console\Commands\UpgradeDatabase;
use FireflyIII\Console\Commands\UpgradeFireflyInstructions;
@@ -63,7 +64,7 @@ class Kernel extends ConsoleKernel
EncryptFile::class,
ScanAttachments::class,
UpgradeDatabase::class,
-
+ MoveRepository::class,
];
/**