-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use package creation reusable workflow #1625
base: trunk
Are you sure you want to change the base?
Conversation
"archive": "zip -r $npm_package_name.zip . -x **.git/\\* **node_modules/\\*", | ||
"postarchive": "yarn run archive:cleanup && rm -rf $npm_package_name && unzip $npm_package_name.zip -d $npm_package_name && rm $npm_package_name.zip && zip -r $npm_package_name.zip $npm_package_name && rm -rf $npm_package_name", | ||
"archive:cleanup": "zip -d $npm_package_name.zip .env* .ddev/\\* \\*.idea/\\* .editorconfig tests/\\* .github/\\* .psalm/\\* wordpress_org_assets/\\* \\*.DS_Store \\*README.md \\*.gitattributes \\*.gitignore \\*composer.json \\*composer.lock patchwork.json phpunit.xml.dist .phpunit.result.cache phpcs.xml* psalm*.xml* playwright.config.js wp-cli.yml \\*.babelrc \\*package.json \\*webpack.config.js \\*yarn.lock \\*.travis.yml\\" | ||
"archive": "wp dist-archive . ./$npm_package_name.zip --plugin-dirname=$npm_package_name" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is composer-assets-compiler
automatically invoked or does it still(?) go into each module and runs yarn build
there?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
assets compiler is running only in the workflow now. I guess we can replace the install:modules:*
and build:modules:*
scripts with it but I can't figure out how to setup it properly, e.g. if I run ddev composer compile-assets -vvv
again it does not rebuild changes.
Composer Assets Compiler
starting...
Not processing 'woocommerce/woocommerce-paypal-payments' because already processed.
Nothing else to process.
done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@AlexP11223 You can either pass --ignore-lock
and/or specify the source directories so it actually picks up file changes:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Biont hm, weird, still the same with --ignore-lock
.
And
"src-paths": [
"./modules/*/resources/js/*.js",
"./modules/*/resources/css/*.scss"
]
had no effect too 🤔
Only deleting .composer_compiled_assets
makes it to rebuild.
btw what was the purpose of --env=root
? https://github.com/inpsyde/reusable-workflows/blob/1674a94f9eb5e5572278cef20e305c98440a1df6/.github/workflows/build-plugin-archive.yml#L57C22-L57C32
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@AlexP11223 use --ignore-lock=*
Changed the package creation workflow to use the reusable workflow https://github.com/inpsyde/reusable-workflows/blob/main/docs/archive-creation.md
The result should be the same, only now the version is included in the zip name, and there is no prefix. The version input is still checked and the current version from the plugin file is added if numeric version is missing, to keep it more valid and to avoid error during plugin info parsing by
dhii/versions
. So you can enterpcp-123-some-feature
and it will createwoocommerce-paypal-payments-2.2.1-pcp-123-some-feature.zip
.Also now the excluded files are in a nicer
.distignore
file instead of the huge exclude string.