Skip to content

Commit 997adb8

Browse files
authored
chore!: remove vendor from repo and cleanup zip. (#73)
* chore!: remove `vendor` from repo and cleanup zip. * chore: update readme
1 parent ac31058 commit 997adb8

23 files changed

+258
-1609
lines changed

.distignore

+1-5
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,7 @@
99
/docker
1010
/docker-output
1111
/docs
12-
/img
1312
/phpstan
14-
/plugin-build
1513
/tests
1614

1715
.coveralls.yml
@@ -20,18 +18,16 @@
2018
.DS_Store
2119
.env
2220
.env.dist
23-
.gitattributes
2421
.gitignore
2522
.phpcs.xml
2623
.phpcs.xml.dist
27-
.travis.yml
2824
CHANGELOG.md
2925
codeception.dist.yml
3026
codeception.yml
3127
composer.json
3228
composer.lock
3329
docker-compose.yml
3430
phpstan.neon.dist
35-
phpunit.xml.dist
31+
phpstan.neon
3632
README.md
3733
schema.graphql

.gitattributes

-18
This file was deleted.

.github/workflows/upload-release.yml

+5-5
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,13 @@ jobs:
2121
tools: composer
2222

2323
- name: Install dependencies
24-
run: |
25-
composer install --no-dev --optimize-autoloader
24+
uses: ramsey/composer-install@v3
25+
with:
26+
composer-options: "--no-progress --no-dev --optimize-autoloader"
2627

27-
- name: Create Artifact
28+
- name: Build and zip
2829
run: |
29-
mkdir plugin-build
30-
composer archive -vvv --format=zip --file="plugin-build/wp-graphql-facetwp"
30+
composer run-script zip
3131
3232
- name: Upload artifact
3333
uses: actions/upload-artifact@v4

.gitignore

+3-4
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,10 @@ plugin-build
2525
auth.json
2626

2727
# Composer deps
28-
!vendor
28+
vendor
29+
!vendor-prefixed
2930
vendor/*
30-
!vendor/autoload.php
31-
!vendor/composer
32-
vendor/composer/*/
31+
!vendor-prefixed/.gitkeep
3332

3433
# NPM deps
3534
node_modules

CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22

33
## [Unreleased]
44

5+
- chore!: Remove `vendor` and `vendor-prefixed/*` from the GitHub repository.
56
- chore: Update Strauss to v0.19.1 and Composer dependencies.
7+
- ci: Cleanup zip and release workflow.
68

79
## v0.5.0
810

README.md

+8-2
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,19 @@ This plugin has been tested and is functional with SearchWP.
2424
* PHP 7.4-8.1.x
2525
* WordPress 5.4.1+
2626
* WPGraphQL 1.6.0+ (1.9.0+ recommended)
27-
* FacetWP 4.0
27+
* FacetWP 4.0+
2828

2929
## Quick Install
3030

3131
1. Install & activate [WPGraphQL](https://www.wpgraphql.com/).
3232
2. Install & activate [FacetWP](https://facetwp.com/).
33-
3. Download the [latest release](https://github.com/hsimah-services/wp-graphql-facetwp/releases) `.zip` file, upload it to your WordPress install, and activate the plugin.
33+
3. Download the `wp-graphql-facetwp.zip` file from the [latest release](https://github.com/hsimah-services/wp-graphql-facetwp/releases/latest) upload it to your WordPress install, and activate the plugin.
34+
35+
> [!IMPORTANT]
36+
>
37+
> Make sure you are downloading the [`wp-graphql-facetwp.zip`](https://github.com/hsimah-services/wp-graphql-facetwp/releases/latest/download/wp-graphql-facetwp.zip) file from the releases page, not the `Source code (zip)` file nor a clone of the repository.
38+
>
39+
> If you wish to use the source code, you will need to run `composer install` inside the plugin folder to install the required dependencies.
3440
3541
### With Composer
3642

composer.json

+9-24
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
"readme": "README.md",
2929
"funding": [
3030
{
31-
"type":"github",
31+
"type": "github",
3232
"url": "https://github.com/sponsors/AxeWP"
3333
}
3434
],
@@ -91,7 +91,7 @@
9191
"phpstan/phpstan": "^1.8",
9292
"phpstan/extension-installer": "^1.1",
9393
"szepeviktor/phpstan-wordpress": "^1.1",
94-
"wp-graphql/wp-graphql-testcase": "~3.0.1",
94+
"wp-graphql/wp-graphql-testcase": "~3.3.0",
9595
"axepress/wp-graphql-stubs": "^1.13",
9696
"axepress/wp-graphql-cs": "^2.0.0-beta",
9797
"wp-cli/wp-cli-bundle": "^2.8.1",
@@ -140,26 +140,11 @@
140140
"vendor/bin/phpstan analyze --ansi --memory-limit=1G"
141141
]
142142
},
143-
"archive": {
144-
"name": "wp-graphql-facetwp",
145-
"exclude": [
146-
"/.*",
147-
"!.wordpress-org",
148-
"bin",
149-
"docker",
150-
"docs",
151-
"phpstan",
152-
"plugin-build",
153-
"tests",
154-
"!vendor",
155-
"/codeception.dist.yml",
156-
"/codeception.yml",
157-
"/composer.json",
158-
"/composer.lock",
159-
"/docker-compose.yml",
160-
"/phpstan.neon.dist",
161-
"/phpunit.xml.dist",
162-
"/README.md"
163-
]
164-
}
143+
"zip": [
144+
"composer install --no-dev --optimize-autoloader",
145+
"mkdir -p plugin-build/wp-graphql-facetwp",
146+
"rsync -rc --exclude-from=.distignore --exclude=plugin-build . plugin-build/wp-graphql-facetwp/ --delete --delete-excluded -v",
147+
"cd plugin-build ; zip -r wp-graphql-facetwp.zip wp-graphql-facetwp",
148+
"rm -rf plugin-build/wp-graphql-facetwp/"
149+
]
165150
}

0 commit comments

Comments
 (0)