@airfleet/generator-init 0.17.0 → 0.17.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -166,18 +166,38 @@ jobs:
|
|
|
166
166
|
# Reference https://trentm.com/json/
|
|
167
167
|
run: |
|
|
168
168
|
NL=$'\n'
|
|
169
|
+
echo "Plugins current:"
|
|
170
|
+
cat $RUNNER_TEMP/plugins.json | json
|
|
171
|
+
echo "$NL $NL $NL"
|
|
169
172
|
PLUGIN_SLUG=$(cat $RUNNER_TEMP/plugin.json | json slug)
|
|
170
173
|
echo "Plugin slug: $PLUGIN_SLUG"
|
|
171
|
-
|
|
174
|
+
echo "$NL $NL $NL"
|
|
172
175
|
echo "Plugin versions:"
|
|
173
|
-
|
|
174
|
-
|
|
176
|
+
cat $RUNNER_TEMP/plugin.json | json versions > $RUNNER_TEMP/plugin_new_version.json
|
|
177
|
+
cat $RUNNER_TEMP/plugins.json | json plugins | json -c "this.slug === '$PLUGIN_SLUG'" | json 0.versions > $RUNNER_TEMP/plugin_existing_versions.json
|
|
178
|
+
cat $RUNNER_TEMP/plugin_new_version.json $RUNNER_TEMP/plugin_existing_versions.json | json --group > $RUNNER_TEMP/plugin_versions.json
|
|
179
|
+
printf '%s\n%s\n%s\n' '{"versions":' "$(cat $RUNNER_TEMP/plugin_versions.json)" '}' | json > $RUNNER_TEMP/plugin_versions_final.json
|
|
180
|
+
cat $RUNNER_TEMP/plugin_versions_final.json
|
|
181
|
+
echo "$NL $NL $NL"
|
|
175
182
|
echo "Plugin updated:"
|
|
176
|
-
|
|
177
|
-
|
|
183
|
+
cat $RUNNER_TEMP/plugins.json | json plugins | json -c "this.slug === '$PLUGIN_SLUG'" | json 0 > $RUNNER_TEMP/plugin_existing.json
|
|
184
|
+
cat $RUNNER_TEMP/plugin.json | json > $RUNNER_TEMP/plugin_formatted.json
|
|
185
|
+
cat $RUNNER_TEMP/plugin_existing.json $RUNNER_TEMP/plugin_formatted.json $RUNNER_TEMP/plugin_versions_final.json | json --merge | json > $RUNNER_TEMP/plugin_updated.json
|
|
186
|
+
cat $RUNNER_TEMP/plugin_updated.json
|
|
187
|
+
echo "$NL $NL $NL"
|
|
178
188
|
echo "Plugins list updated:"
|
|
179
|
-
|
|
180
|
-
cat $RUNNER_TEMP/
|
|
189
|
+
cat $RUNNER_TEMP/plugins.json | json plugins | json -c "this.slug !== '$PLUGIN_SLUG'" > $RUNNER_TEMP/plugins_list_excluded.json
|
|
190
|
+
cat $RUNNER_TEMP/plugin_updated.json | json --group > $RUNNER_TEMP/plugins_list_added.json
|
|
191
|
+
cat $RUNNER_TEMP/plugins_list_excluded.json $RUNNER_TEMP/plugins_list_added.json | json --group > $RUNNER_TEMP/plugins_list_updated.json
|
|
192
|
+
cat $RUNNER_TEMP/plugins_list_updated.json
|
|
193
|
+
echo "$NL $NL $NL"
|
|
194
|
+
echo "Plugins updated:"
|
|
195
|
+
printf '%s\n%s\n%s\n' '{"plugins":' "$(cat $RUNNER_TEMP/plugins_list_updated.json)" '}' | json > $RUNNER_TEMP/plugins_new.json
|
|
196
|
+
cat $RUNNER_TEMP/plugins_new.json
|
|
197
|
+
echo "$NL $NL $NL"
|
|
198
|
+
echo "Final merge:"
|
|
199
|
+
cat $RUNNER_TEMP/plugins.json $RUNNER_TEMP/plugins_new.json | json --merge > $RUNNER_TEMP/plugins_updated.json
|
|
200
|
+
cat $RUNNER_TEMP/plugins_updated.json
|
|
181
201
|
|
|
182
202
|
- name: 🚀 Upload updated plugins list to AWS
|
|
183
203
|
run: |
|
|
@@ -20,25 +20,27 @@ class Setup extends PluginFeatures {
|
|
|
20
20
|
<%_ if (optionsPage === 'framework' ) { _%>
|
|
21
21
|
$options = new Options();
|
|
22
22
|
<%_ } _%>
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
23
|
+
parent::__construct(
|
|
24
|
+
[
|
|
25
|
+
new Enqueue( $config ),
|
|
26
|
+
<%_ if (optionsPage === 'framework' ) { _%>
|
|
27
|
+
new Pages( $options ),
|
|
28
|
+
new SettingsLink( $config ),
|
|
29
|
+
<%_ } _%>
|
|
30
|
+
<%_ if (optionsPage === 'acf' ) { _%>
|
|
31
|
+
new AcfAirfleetOptionsSubPage( $config ),
|
|
32
|
+
new AcfSettingsLink( $config ),
|
|
33
|
+
<%_ } _%>
|
|
34
|
+
<%_ if (ajaxVariables.frontend) { _%>
|
|
35
|
+
new AjaxVariables(),
|
|
36
|
+
<%_ } _%>
|
|
37
|
+
<%_ if (ajaxVariables.admin) { _%>
|
|
38
|
+
new AjaxVariablesAdmin(),
|
|
39
|
+
<%_ } _%>
|
|
40
|
+
<%_ if (answers.pluginAcfLocalJson) { _%>
|
|
41
|
+
new LocalJson( $config['path'] . 'acf-json' ),
|
|
42
|
+
<%_ } _%>
|
|
43
|
+
]
|
|
44
|
+
);
|
|
43
45
|
}
|
|
44
46
|
}
|
|
@@ -55,7 +55,7 @@ $<%= name.snake %> = new \Airfleet\Plugins\<%= nameNoAirfleet.pascal %>\Setup(
|
|
|
55
55
|
);
|
|
56
56
|
register_activation_hook( __FILE__, [ $<%= name.snake %>, 'on_activation' ] );
|
|
57
57
|
register_deactivation_hook( __FILE__, [ $<%= name.snake %>, 'on_deactivation' ] );
|
|
58
|
-
register_uninstall_hook( __FILE__,
|
|
58
|
+
register_uninstall_hook( __FILE__, '\Airfleet\Plugins\<%= nameNoAirfleet.pascal %>\Setup::uninstall' );
|
|
59
59
|
$<%= name.snake %>->initialize();
|
|
60
60
|
|
|
61
61
|
/**
|