]>
Raphaƫl G. Git Repositories - airlibre/blob - run
4 export APP_SECRET
=`cat /dev/urandom | tr -dc 'A-Za-z0-9+,.:;@_-' | head -c 64`
5 export MAILER_DSN
='smtp://localhost'
10 read -p 'Full reset Yes/[No] ?' full
13 if [ "$full" = 'Yes' -o "$full" = 'YES' -o "$full" = 'yes' ]; then
14 # Check if we have a rapsys racine
15 if [ -d vendor
/rapsys
]; then
16 # Process each remaining git sub directory
17 for i
in `ls -d vendor/rapsys/*`; do
19 # Stash modifications if present
23 # Force kick untracked files and directories
29 # Stash modifications if present
33 # Force kick untracked files and directories
37 sudo
rm -fr var
/{cache
/{dev
,prod
,test},log
,sessions
} public
/{css
,js
,img
,bundles
};
40 mkdir -p var
/{cache
/{dev
,prod
,test},log
,sessions
} public
/{css
,js
,img
,bundles
};
43 touch '.env.local.php'
46 chown
$USER.
'.env.local.php' var
/{cache
/{,dev
,prod
,test},log
,sessions
} public
/{,css
,js
,img
,bundles
};
49 setfacl
-m u
:apache
:rwX
'.env.local.php' var
/{cache
/{,dev
,prod
,test},log
,sessions
} public
/{css
,js
,img
,bundles
};
52 composer
install --no-scripts
58 git checkout
-- composer.json
60 # Recreate src/Entity for doctrine
63 # Run scripts as apache
64 sudo
-u apache composer auto
-scripts
67 perl
-ne 'my %e=(APP_ENV=>"'$APP_ENV'",APP_SECRET=>"'${APP_SECRET/@/\\@}'",MAILER_DSN=>"'$MAILER_DSN'");my $p=join("|",keys %e);if(/^[#\s]*($p)=/){$_=$1."=\"".$e{$1}."\"\n";};print $_;' -i.orig .env
70 sudo
-u apache composer symfony
:dump
-env $APP_ENV
73 setfacl
-b '.env.local.php'
76 sudo
-u apache php bin
/console doctrine
:schema
:drop
--force
78 # Create current schema
79 sudo
-u apache php bin
/console doctrine
:schema
:create
82 sudo
-u apache php bin
/console doctrine
:fixtures
:load
--env=dev
--no-interaction
85 sudo
-u apache php bin
/console cache
:clear
88 rm -fr var
/{cache
/{dev
,prod
,test},log
,sessions
} public
/bundles
;
91 mkdir -p var
/{cache
/{dev
,prod
,test},log
,sessions
} public
/{,bundles
/rapsyspack
/}{css
,js
,img
};
94 sudo chown
$USER. var
/{cache
/{,dev
,prod
,test},log
,sessions
} public
/{,css
,js
,img
,bundles
/{,rapsyspack
/{,css
,js
,img
}}};
97 sudo setfacl
-m u
:apache
:rwX var
/{cache
/{,dev
,prod
,test},log
,sessions
} public
/{css
,js
,img
,bundles
/{,rapsyspack
/{css
,js
,img
}}};
100 composer update
--no-scripts
105 # Reset composer.json
106 git checkout
-- composer.json
109 rm -fr var
/{cache
/{dev
,prod
,test},log
,sessions
} public
/bundles
;
112 mkdir -p var
/{cache
/{dev
,prod
,test},log
,sessions
} public
/{,bundles
/rapsyspack
/}{css
,js
,img
};
115 sudo chown
$USER. var
/{cache
/{,dev
,prod
,test},log
,sessions
} public
/{,css
,js
,img
,bundles
/{,rapsyspack
/{,css
,js
,img
}}};
118 sudo setfacl
-m u
:apache
:rwX var
/{cache
/{,dev
,prod
,test},log
,sessions
} public
/{css
,js
,img
,bundles
/{,rapsyspack
/{,css
,js
,img
}}};
120 # Run scripts as apache
121 sudo
-u apache composer auto
-scripts
124 sudo
-u apache php bin
/console cache
:clear
128 mkdir -p var
/{cache
/{dev
,prod
,test},log
,sessions
} public
/{,bundles
/rapsyspack
/}{css
,js
,img
};
131 sudo chown
$USER. var
/{cache
/{,dev
,prod
,test},log
,sessions
} public
/{,css
,js
,img
,bundles
/{,rapsyspack
/{,css
,js
,img
}}};
134 setfacl
-m u
:apache
:rwX var
/{cache
/{,dev
,prod
,test},log
,sessions
} public
/{css
,js
,img
,bundles
/{,rapsyspack
/{css
,js
,img
}}};