Skip to content

Commit 093e415

Browse files
authored
Release/beta2 (#3)
* Don't publish hub resources * Make sure currency is set to enabled * Add a collection group on install
1 parent 8570ab4 commit 093e415

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

src/Console/InstallGetCandy.php

+11-9
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
use GetCandy\Models\AttributeGroup;
99
use GetCandy\Models\Channel;
1010
use GetCandy\Models\Collection;
11+
use GetCandy\Models\CollectionGroup;
1112
use GetCandy\Models\Country;
1213
use GetCandy\Models\Currency;
1314
use GetCandy\Models\CustomerGroup;
@@ -59,8 +60,6 @@ public function handle(): void
5960

6061
$this->info('Publishing hub assets');
6162

62-
$this->publishResources();
63-
6463
if (! Country::count()) {
6564
$this->info('Importing countries');
6665
$this->call('getcandy:import:address-data');
@@ -116,6 +115,7 @@ public function handle(): void
116115
'thousand_point' => ',',
117116
'decimal_places' => 2,
118117
'default' => true,
118+
'enabled' => true,
119119
]);
120120
}
121121

@@ -129,6 +129,15 @@ public function handle(): void
129129
]);
130130
}
131131

132+
if (!CollectionGroup::count()) {
133+
$this->info('Adding an initial collection group');
134+
135+
CollectionGroup::create([
136+
'name' => 'Main',
137+
'handle' => 'main',
138+
]);
139+
}
140+
132141
if (! TaxClass::count()) {
133142
$this->info('Adding a default tax class.');
134143

@@ -301,11 +310,4 @@ private function publishConfiguration($forcePublish = false): void
301310

302311
$this->call('vendor:publish', $params);
303312
}
304-
305-
private function publishResources()
306-
{
307-
$this->call('vendor:publish', [
308-
'--tag' => 'getcandy:hub:public',
309-
]);
310-
}
311313
}

0 commit comments

Comments
 (0)