Ensure help sync creates cache directory
This commit is contained in:
@@ -77,6 +77,8 @@ class HelpSyncService
|
|||||||
foreach ($articles->groupBy(fn ($article) => $article['audience'].'::'.$article['locale']) as $key => $group) {
|
foreach ($articles->groupBy(fn ($article) => $article['audience'].'::'.$article['locale']) as $key => $group) {
|
||||||
[$audience, $locale] = explode('::', $key);
|
[$audience, $locale] = explode('::', $key);
|
||||||
$path = sprintf('%s/%s/%s/articles.json', $compiledPath, $audience, $locale);
|
$path = sprintf('%s/%s/%s/articles.json', $compiledPath, $audience, $locale);
|
||||||
|
$directory = sprintf('%s/%s/%s', $compiledPath, $audience, $locale);
|
||||||
|
Storage::disk($disk)->makeDirectory($directory);
|
||||||
Storage::disk($disk)->put($path, $group->values()->toJson(JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE));
|
Storage::disk($disk)->put($path, $group->values()->toJson(JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE));
|
||||||
Cache::forget($this->cacheKey($audience, $locale));
|
Cache::forget($this->cacheKey($audience, $locale));
|
||||||
$written[$audience][$locale] = $group->count();
|
$written[$audience][$locale] = $group->count();
|
||||||
|
|||||||
@@ -36,8 +36,6 @@ ensure_helper_scripts() {
|
|||||||
prepare_storage() {
|
prepare_storage() {
|
||||||
cd "$APP_TARGET"
|
cd "$APP_TARGET"
|
||||||
|
|
||||||
mkdir -p storage/app storage/framework/cache storage/framework/sessions storage/framework/views storage/logs
|
|
||||||
|
|
||||||
if [[ ! -h public/storage ]]; then
|
if [[ ! -h public/storage ]]; then
|
||||||
php artisan storage:link >/dev/null 2>&1 || true
|
php artisan storage:link >/dev/null 2>&1 || true
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user