-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into ft-wp-env
- Loading branch information
Showing
13 changed files
with
723 additions
and
637 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,24 @@ | ||
/.github | ||
/.saas-cache | ||
/bin | ||
/tests | ||
/.git | ||
/.saas-cache | ||
.distignore | ||
.editorconfig | ||
.phpcs.xml.dist | ||
.gitignore | ||
.* | ||
.*/ | ||
*.lock | ||
*.md | ||
*.zip | ||
*.sh | ||
/bin/ | ||
/build/ | ||
/node_modules/ | ||
/tests/ | ||
composer.* | ||
Gruntfile.js | ||
codecov.yml | ||
commonsbooking.zip | ||
composer.json | ||
composer.lock | ||
copy-svn.sh | ||
gruntfile.js | ||
package.json | ||
none | ||
package-lock.json | ||
package.json | ||
phpcs.xml | ||
phpunit.xml | ||
phpunit.xml.dist | ||
zipdist.sh | ||
phpunit | ||
project.json | ||
README.md | ||
|
||
tsconfig.* | ||
webpack.config.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: Create release | ||
on: | ||
release: | ||
types: | ||
- created | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
|
||
- uses: actions/checkout@v3 | ||
|
||
- uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: '7.4' | ||
|
||
- uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: '3.0.6' # Not needed with a .ruby-version file | ||
bundler-cache: true # runs 'bundle install' and caches installed gems automatically | ||
- run: gem install compass | ||
|
||
- uses: actions/setup-node@v2 | ||
with: | ||
node-version: 12 | ||
|
||
- name: Run build script | ||
run: bin/build-zip.sh | ||
|
||
- name: Release | ||
uses: softprops/action-gh-release@v1 | ||
if: startsWith(github.ref, 'refs/tags/') | ||
with: | ||
files: commonsbooking.zip | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#!/bin/sh | ||
# Borrows from https://github.com/woocommerce/woocommerce/blob/trunk/plugins/woocommerce/bin/build-zip.sh | ||
|
||
PLUGIN_SLUG="commonsbooking" | ||
PROJECT_PATH=$(pwd) | ||
BUILD_PATH="${PROJECT_PATH}/build" | ||
DEST_PATH="$BUILD_PATH/$PLUGIN_SLUG" | ||
|
||
echo "Generating build directory..." | ||
rm -rf "$BUILD_PATH" | ||
mkdir -p "$DEST_PATH" | ||
|
||
echo "Installing PHP and JS dependencies..." | ||
npm ci | ||
echo "Running JS Build..." | ||
grunt dist || exit "$?" | ||
echo "Cleaning up PHP dependencies..." | ||
composer install --no-dev --ignore-platform-reqs || exit "$?" | ||
echo "Run makepot..." | ||
wp i18n make-pot . languages/commonsbooking.pot | ||
echo "Syncing files..." | ||
rsync -rc --exclude-from="$PROJECT_PATH/.distignore" "$PROJECT_PATH/" "$DEST_PATH/" --delete --delete-excluded | ||
|
||
echo "Generating zip file..." | ||
cd "$BUILD_PATH" || exit | ||
zip -q -r "${PLUGIN_SLUG}.zip" "$PLUGIN_SLUG/" | ||
|
||
cd "$PROJECT_PATH" || exit | ||
mv "$BUILD_PATH/${PLUGIN_SLUG}.zip" "$PROJECT_PATH" | ||
echo "${PLUGIN_SLUG}.zip file generated!" | ||
|
||
echo "Build done!" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Oops, something went wrong.