Skip to content

Commit

Permalink
Updated deploy (test)
Browse files Browse the repository at this point in the history
  • Loading branch information
ole1986 committed Nov 27, 2024
1 parent bcde35b commit 1342d24
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 9 deletions.
2 changes: 0 additions & 2 deletions .distignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,5 @@ assets
.git
.github

vendor

.distignore
.gitignore
10 changes: 10 additions & 0 deletions .github/workflows/wordpress-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,16 @@ jobs:
run: |
sudo apt-get update
sudo apt-get install subversion
- run: rm composer.lock
- name: Install dependencies
run: composer install --no-interaction --prefer-source
- name: Run strauss
run: composer prefix-namespaces
- name: FIX ROSPDF includes and fonts
run: cp -r vendor/rospdf/pdf-php/src/{include,fonts} vendor_build/rospdf/pdf-php/src/
- name: Remove vendor
run: rm -r vendor
- run: composer dump-autoload
- name: WordPress Plugin Deploy
id: deploy
uses: 10up/action-wordpress-plugin-deploy@stable
Expand Down
5 changes: 2 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@
],
"scripts": {
"prefix-namespaces": [
"strauss",
"@php composer dump-autoload"
"strauss"
]
},
"autoload": {
Expand All @@ -28,7 +27,7 @@
"classmap_prefix": "",
"constant_prefix": "",
"packages": [],
"update_call_sites": false,
"update_call_sites": true,
"override_autoload": {},
"exclude_from_copy": {
"packages": [],
Expand Down
8 changes: 4 additions & 4 deletions wc-recurring.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@
define('WCRECURRING_PLUGIN_DIR', plugin_dir_path(__FILE__));
define('WCRECURRING_PLUGIN_URL', plugin_dir_url(__FILE__));

if (file_exists('vendor_build/autoload.php')) {
require_once 'vendor_build/autoload.php';
} else {
require_once 'vendor/autoload.php';
require_once 'vendor/autoload.php';

if (file_exists(WCRECURRING_PLUGIN_DIR. '/vendor_build/autoload.php')) {
require_once WCRECURRING_PLUGIN_DIR .'/vendor_build/autoload.php';
}

add_action('init', ['\WcRecurring\WcRecurringIndex', 'init']);
Expand Down

0 comments on commit 1342d24

Please sign in to comment.