Skip to content

Commit

Permalink
Release 2.1.0 (#184)
Browse files Browse the repository at this point in the history
  • Loading branch information
doekenorg authored Sep 25, 2023
1 parent c7a96fe commit 9d384fa
Show file tree
Hide file tree
Showing 23 changed files with 1,004 additions and 289 deletions.
15 changes: 12 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,27 @@ jobs:
- run:
name: Building and packaging
command: |
/home/circleci/tooling/build-tools/build_tools.sh composer -o "install --no-dev"
rm -rf vendor/phpoffice/phpspreadsheet/{bin,docs,samples}
/home/circleci/tooling/build-tools/build_tools.sh composer -o "build"
rm -rf src
if [ "${CIRCLE_BRANCH}" != "main" ]; then
/home/circleci/tooling/build-tools/build_tools.sh package_build -o "gf-entries-in-excel gfexcel.php --include-hash"
else
/home/circleci/tooling/build-tools/build_tools.sh package_build -o "gf-entries-in-excel gfexcel.php $([[ $(git log -n 1 | grep "\[skip release\]") ]] && echo --include-hash)"
fi
mkdir -p gf-entries-in-excel
mv vendor gf-entries-in-excel
rm -rf build/composer.* build/strauss.phar
cp -R build gf-entries-in-excel
zip -gr $(ls gf-entries-in-excel-*.zip) gf-entries-in-excel
mkdir .release
cp gf-entries-in-excel-*.zip .release
- run:
name: Creating a GitHub release
command: |
if [ "${CIRCLE_BRANCH}" == "main" ]; then
git config user.email "[email protected]"
git config user.name "GravityKit - CI"
/home/circleci/tooling/build-tools/build_tools.sh create_release -o "gfexcel.php $(ls gf-entries-in-excel-*.zip)"
fi
- run:
name: Notifying GravityKit Release Manager
command: |
Expand Down
4 changes: 3 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@ phpstan.neon export-ignore
phpunit.xml export-ignore
phpunit.xml.dist export-ignore
README.md export-ignore
strauss.phar export-ignore
build export-ignore

/.circleci export-ignore
/.github export-ignore
/.idea export-ignore
/tests export-ignore
/tests export-ignore
3 changes: 2 additions & 1 deletion .github/workflows/phpunit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ jobs:
${{ runner.os }}-build-${{ matrix.php-versions }}-
- name: Install dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: composer install --prefer-dist --no-progress
# We run `--no-scripts` to avoid using Strauss during unit tests
run: composer install --prefer-dist --no-progress --no-scripts
# Add a test script to composer.json, for instance: "test": "vendor/bin/phpunit"
# Docs: https://getcomposer.org/doc/articles/scripts.md

Expand Down
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,9 @@ vendor/
deploy.sh
.idea
wp-content
*cache
*cache
build/*
vendor_prefixed
!vendor_prefixed/.gitkeep
!build/strauss.phar
!build/vendor_prefixed/.gitkeep
Binary file added build/strauss.phar
Binary file not shown.
Empty file added build/vendor_prefixed/.gitkeep
Empty file.
52 changes: 45 additions & 7 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"license": "GPL-2.0-only",
"authors": [
{
"name": "GravityView",
"email": "support@gravityview.co"
"name": "GravityKit",
"email": "support@gravitykit.com"
},
{
"name": "Doeke Norg",
Expand All @@ -30,6 +30,9 @@
"phpoffice/phpspreadsheet": "1.12"
},
"autoload": {
"classmap": [
"vendor_prefixed"
],
"psr-4": {
"GFExcel\\": "src/"
}
Expand All @@ -47,12 +50,47 @@
"overtrue/phplint": "^2.1"
},
"scripts": {
"unbuild": "rm -rf build/composer.* build/vendor build/src",
"build": [
"@unbuild",
"cp composer.json build/composer.json",
"mkdir build/src && cp src/GFExcelAdmin.php build/src/",
"composer config repositories.source '{\"type\":\"path\", \"url\":\"../src\",\"options\": {\"symlink\":false}}' --working-dir=build",
"composer require gravitykit/gravityexport-lite-src:@dev --update-no-dev --working-dir=build --no-scripts",
"cd build && ./strauss.phar",
"composer dump-autoload -o --working-dir=build"
],
"linter": "vendor/bin/phplint --no-cache",
"test": "vendor/bin/phpunit",
"markbaker-fix-namespace": "find ./vendor -name \"*.php\" | xargs -n 1 sed -i'_gfe' -E -e 's/(use|namespace) (Complex|Matrix)/\\1 GFExcel\\\\Vendor\\\\\\2/g' && find ./vendor -name \"*_gfe\" -delete",
"markbaker-fix-autoload": "find ./vendor/composer -name \"*.php\" | xargs -n 1 sed -i'_gfe' -E -e 's/(Matrix|Complex)\\\\\/GFExcel\\\\\\\\Vendor\\\\\\\\\\1\\\\/g' && find ./vendor -name \"*_gfe\" -delete",
"post-install-cmd": "composer run markbaker-fix-namespace",
"post-update-cmd": "composer run markbaker-fix-namespace",
"post-autoload-dump": "composer run markbaker-fix-autoload"
"post-install-cmd": [
"composer dump-autoload -o"
],
"post-update-cmd": [
"composer dump-autoload -o"
]
},
"extra": {
"strauss": {
"target_directory": "vendor_prefixed",
"namespace_prefix": "GFExcel\\Vendor",
"classmap_prefix": "GFExcel_Vendor",
"classmap_output": false,
"delete_vendor_packages": true,
"delete_vendor_files": true,
"exclude_from_prefix": {
"namespaces": [
"GFExcel"
]
},
"override_autoload": {
"gravitykit/gravityexport-base": {
"files": [
"templates",
"public",
"src"
]
}
}
}
}
}
Loading

0 comments on commit 9d384fa

Please sign in to comment.