Merge branch 'dev' of https://git.willaspace.com/WillaEngine-Project/WillaEngine into dev
commit
06cd5d1912
@ -0,0 +1,38 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# rsync script
|
||||||
|
|
||||||
|
git pull origin master
|
||||||
|
|
||||||
|
cd modules
|
||||||
|
for f in *
|
||||||
|
do
|
||||||
|
cd $f && git pull origin master && cd ..
|
||||||
|
done
|
||||||
|
cd ..
|
||||||
|
|
||||||
|
npm install
|
||||||
|
|
||||||
|
rm -r /home/administrator/apps/willaengine/public/js/vue
|
||||||
|
|
||||||
|
npm run production
|
||||||
|
|
||||||
|
rm -r /home/administrator/apps/nginx/www/willaengine/public/js/vue
|
||||||
|
rm -r /home/administrator/apps/nginx/www/willamall/public/js/vue
|
||||||
|
rm -r /home/administrator/apps/nginx/www/willaarts/public/js/vue
|
||||||
|
|
||||||
|
cp -r /home/administrator/apps/willaengine/public/js/vue /home/administrator/apps/nginx/www/willaengine/public/js/
|
||||||
|
|
||||||
|
cp -r /home/administrator/apps/willaengine/public/js/vue /home/administrator/apps/nginx/www/willamall/public/js/
|
||||||
|
|
||||||
|
cp -r /home/administrator/apps/willaengine/public/js/vue /home/administrator/apps/nginx/www/willaarts/public/js/
|
||||||
|
|
||||||
|
cp /home/administrator/apps/willaengine/public/mix-manifest.json /home/administrator/apps/nginx/www/willaengine/public/
|
||||||
|
|
||||||
|
cp /home/administrator/apps/willaengine/public/mix-manifest.json /home/administrator/apps/nginx/www/willaarts/public/
|
||||||
|
|
||||||
|
|
||||||
|
sudo chown -R www-data:www-data /home/administrator/apps/nginx/www/willaarts/public
|
||||||
|
|
||||||
|
sudo chown -R www-data:www-data /home/administrator/apps/nginx/www/willamall/public
|
||||||
|
|
||||||
|
sudo chown -R www-data:www-data /home/administrator/apps/nginx/www/willaengine
|
@ -0,0 +1,28 @@
|
|||||||
|
pipeline {
|
||||||
|
agent {
|
||||||
|
node {
|
||||||
|
label 'willa'
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
stages {
|
||||||
|
stage('build') {
|
||||||
|
steps {
|
||||||
|
sh 'docker build -t registry.willaspace.com/willaspace/$IMAGE_NAME:latest .'
|
||||||
|
sh 'cd /home/administrator/apps/$IMAGE_NAME/;sudo ./BuildDocker'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('deploy') {
|
||||||
|
steps {
|
||||||
|
sh 'cd /home/administrator/apps/$IMAGE_NAME/ ; docker-compose up -d'
|
||||||
|
sh 'docker exec willaengine service cron start'
|
||||||
|
sh 'docker exec willaengine php artisan config:cache'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
environment {
|
||||||
|
IMAGE_NAME = 'willaengine'
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,85 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Console\Commands;
|
||||||
|
|
||||||
|
use Illuminate\Console\Command;
|
||||||
|
use WM\Core\Models\Business;
|
||||||
|
use WM\Core\Models\User;
|
||||||
|
|
||||||
|
class UserChangeInformation extends Command
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* The name and signature of the console command.
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
protected $signature = 'transport:user';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The console command description.
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
protected $description = 'transport users';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create a new command instance.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
parent::__construct();
|
||||||
|
}
|
||||||
|
|
||||||
|
private function firstNameLengthUpdate(User $user)
|
||||||
|
{
|
||||||
|
$fistName = $user->first_name;
|
||||||
|
|
||||||
|
$fistNameLength = strlen(utf8_decode($fistName));
|
||||||
|
|
||||||
|
$user->update([
|
||||||
|
'first_name_length' => $fistNameLength
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Execute the console command.
|
||||||
|
*
|
||||||
|
* @return int
|
||||||
|
*/
|
||||||
|
public function handle()
|
||||||
|
{
|
||||||
|
|
||||||
|
$users = User::all();
|
||||||
|
|
||||||
|
foreach ($users as $user) {
|
||||||
|
|
||||||
|
$business = Business::find($user->business_id);
|
||||||
|
|
||||||
|
if (!is_null($business)) {
|
||||||
|
|
||||||
|
if ($business->user_id == $user->id) {
|
||||||
|
|
||||||
|
$this->firstNameLengthUpdate($user);
|
||||||
|
$business->user()->attach($user->id, [
|
||||||
|
'responsibility' => $user->responsibility,
|
||||||
|
'is_owner' => 1
|
||||||
|
]);
|
||||||
|
$this->info("add and update user : $user->id");
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
$this->firstNameLengthUpdate($user);
|
||||||
|
$business->user()->attach($user->id, [
|
||||||
|
'responsibility' => $user->responsibility
|
||||||
|
]);
|
||||||
|
$this->info("add and update user : $user->id");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,128 @@
|
|||||||
|
{
|
||||||
|
"name": "laravel/laravel",
|
||||||
|
"type": "project",
|
||||||
|
"description": "The Laravel Framework.",
|
||||||
|
"keywords": [
|
||||||
|
"framework",
|
||||||
|
"laravel"
|
||||||
|
],
|
||||||
|
"license": "MIT",
|
||||||
|
"require": {
|
||||||
|
"php": "^7.4",
|
||||||
|
"coraxster/flysystem-aws-s3-v3-minio": "^1.0",
|
||||||
|
"fideloper/proxy": "^4.0",
|
||||||
|
"laravel/framework": "^8.0",
|
||||||
|
"laravel/passport": "^10",
|
||||||
|
"laravel/tinker": "^2.0",
|
||||||
|
"maatwebsite/excel": "^3.1",
|
||||||
|
"nestedset/willaarts": "^5.0.7",
|
||||||
|
"sentry/sentry-laravel": "^2.3",
|
||||||
|
"spatie/laravel-medialibrary": "^8.0.0",
|
||||||
|
"io-developer/php-whois": "^4.0",
|
||||||
|
"silber/bouncer": "v1.0.0-rc.10",
|
||||||
|
"wm/blog": "dev-master",
|
||||||
|
"wm/common": "dev-master",
|
||||||
|
"wm/core": "dev-master",
|
||||||
|
"wm/crm": "dev-master",
|
||||||
|
"wm/portfolio": "dev-master",
|
||||||
|
"wm/product": "dev-master",
|
||||||
|
"wm/service": "dev-master",
|
||||||
|
"wm/store": "dev-master",
|
||||||
|
"wm/admin": "dev-master",
|
||||||
|
"wm/notification": "dev-master",
|
||||||
|
"zircote/swagger-php": "^3.0"
|
||||||
|
},
|
||||||
|
"provide": {
|
||||||
|
"ext-imagick": "*"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"facade/ignition": "^2.3.6",
|
||||||
|
"fzaninotto/faker": "^1.4",
|
||||||
|
"mockery/mockery": "^1.0",
|
||||||
|
"nunomaduro/collision": "^5.0",
|
||||||
|
"phpunit/phpunit": "^9.0"
|
||||||
|
},
|
||||||
|
"config": {
|
||||||
|
"optimize-autoloader": true,
|
||||||
|
"preferred-install": "dist",
|
||||||
|
"sort-packages": true
|
||||||
|
},
|
||||||
|
"extra": {
|
||||||
|
"laravel": {
|
||||||
|
"dont-discover": []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"App\\": "app/",
|
||||||
|
"Modules\\": "Modules/"
|
||||||
|
},
|
||||||
|
"classmap": [
|
||||||
|
"database/seeds",
|
||||||
|
"database/factories"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"autoload-dev": {
|
||||||
|
"psr-4": {
|
||||||
|
"Tests\\": "tests/"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"minimum-stability": "dev",
|
||||||
|
"prefer-stable": true,
|
||||||
|
"scripts": {
|
||||||
|
"post-autoload-dump": [
|
||||||
|
"Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
|
||||||
|
"@php artisan package:discover --ansi",
|
||||||
|
"@php artisan morphmap:cache"
|
||||||
|
],
|
||||||
|
"post-root-package-install": [
|
||||||
|
"@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
|
||||||
|
],
|
||||||
|
"post-create-project-cmd": [
|
||||||
|
"@php artisan key:generate --ansi"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
|
||||||
|
"repositories": [
|
||||||
|
{
|
||||||
|
"type": "vcs",
|
||||||
|
"url": "https://58848959365c8b792ba52b7552230260bddd9762@git.willaspace.com/WillaEngine-Project/crm.git"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "vcs",
|
||||||
|
"url": "https://58848959365c8b792ba52b7552230260bddd9762@git.willaspace.com/WillaEngine-Project/common.git"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "vcs",
|
||||||
|
"url": "https://58848959365c8b792ba52b7552230260bddd9762@git.willaspace.com/WillaEngine-Project/core.git"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "vcs",
|
||||||
|
"url": "https://58848959365c8b792ba52b7552230260bddd9762@git.willaspace.com/WillaEngine-Project/blog.git"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "vcs",
|
||||||
|
"url": "https://58848959365c8b792ba52b7552230260bddd9762@git.willaspace.com/WillaEngine-Project/portfolio.git"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "vcs",
|
||||||
|
"url": "https://58848959365c8b792ba52b7552230260bddd9762@git.willaspace.com/WillaEngine-Project/product.git"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "vcs",
|
||||||
|
"url": "https://58848959365c8b792ba52b7552230260bddd9762@git.willaspace.com/WillaEngine-Project/service.git"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "vcs",
|
||||||
|
"url": "https://58848959365c8b792ba52b7552230260bddd9762@git.willaspace.com/WillaEngine-Project/store.git"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "vcs",
|
||||||
|
"url": "https://58848959365c8b792ba52b7552230260bddd9762@git.willaspace.com/WillaEngine-Project/notification.git"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "vcs",
|
||||||
|
"url": "https://58848959365c8b792ba52b7552230260bddd9762@git.willaspace.com/WillaEngine-Project/admin.git"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in new issue