diff --git a/.gitignore b/.gitignore index 3649138eed..8773d27fb8 100644 --- a/.gitignore +++ b/.gitignore @@ -10,5 +10,4 @@ test-coverage-html/ screenshots .DS_Store -/tests/wpa/test-mu-plugins/custom-ep-credentials.php -wpa-elasticsearch.yml \ No newline at end of file +payload \ No newline at end of file diff --git a/bin/build-zip.sh b/bin/build-zip.sh new file mode 100755 index 0000000000..1fe5aefd81 --- /dev/null +++ b/bin/build-zip.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +npm ci +npm run build + +rm -r ./payload + +TMP_DIR="./payload/elasticpress" +mkdir -p $TMP_DIR +rsync -rc --exclude-from=".distignore" --exclude="payload" . "$TMP_DIR/" && cd $TMP_DIR/.. && zip -r "./elasticpress.zip" . diff --git a/package.json b/package.json index 4613f0379f..fb0c178251 100644 --- a/package.json +++ b/package.json @@ -18,13 +18,13 @@ "start": "composer install --ignore-platform-reqs && npm install && npm run build", "build": "10up-toolkit build", "watch": "10up-toolkit start", - "build-release": "npm install && composer install --no-dev -o && npm run build", "lint-release": "npm install && composer install && npm run lint", "lint-js": "10up-toolkit lint-js assets/js tests/cypress", "lint-php": "composer run lint", "format-js": "10up-toolkit format-js assets/js", "lint": "npm run lint-style && npm run lint-js && npm run lint-php", "build:docs": "rm -rf hook_docs && jsdoc -c hookdoc-conf.json elasticpress.php includes", + "build:zip": "./bin/build-zip.sh", "lint-style": "10up-toolkit lint-style", "env": "wp-env", "env:start": "wp-env start && cd bin/es-docker/ && docker-compose up -d",