This file contains hidden or 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
| <?php | |
| namespace App\Console\Commands; | |
| use Hyn\Tenancy\Contracts\Database\PasswordGenerator; | |
| use Hyn\Tenancy\Contracts\Repositories\WebsiteRepository; | |
| use Illuminate\Config\Repository as Config; | |
| use Illuminate\Console\Command; | |
| use Illuminate\Console\ConfirmableTrait; |
This file contains hidden or 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
| <?php | |
| namespace App\Traits; | |
| use Hyn\Tenancy\Contracts\Repositories\WebsiteRepository; | |
| use Hyn\Tenancy\Environment; | |
| use Hyn\Tenancy\Repositories\HostnameRepository; | |
| use Illuminate\Database\Eloquent\Collection; | |
| trait RunsOnTenants |
This file contains hidden or 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
| @setup | |
| require __DIR__.'/vendor/autoload.php'; | |
| (new \Dotenv\Dotenv(__DIR__, '.env'))->load(); | |
| $server = "spatie.be"; | |
| $userAndServer = 'forge@'. $server; | |
| $repository = "spatie/spatie.be"; | |
| $baseDir = "/home/forge/spatie.be"; | |
| $releasesDir = "{$baseDir}/releases"; | |
| $currentDir = "{$baseDir}/current"; |
This file contains hidden or 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
| #!/usr/bin/env bash | |
| # MIT © Sindre Sorhus - sindresorhus.com | |
| changed_files="$(git diff-tree -r --name-only --no-commit-id HEAD@{1} HEAD)" | |
| check_run() { | |
| echo "$changed_files" | grep --quiet "$1" && echo " * changes detected in $1" && echo " * running $2" && eval "$2" | |
| } | |
| check_run composer.lock "composer install" | |
| check_run package.json "npm install" |
This file contains hidden or 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
| #!/usr/bin/env bash | |
| # MIT © Sindre Sorhus - sindresorhus.com | |
| changed_files="$(git diff-tree -r --name-only --no-commit-id HEAD@{1} HEAD)" | |
| check_run() { | |
| echo "$changed_files" | grep --quiet "$1" && echo " * changes detected in $1" && echo " * running $2" && eval "$2" | |
| } | |
| check_run composer.lock "composer install" | |
| check_run package.json "npm install" |