-
Notifications
You must be signed in to change notification settings - Fork 2
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
Bug theme when specify path #120
Comments
In tests the paths are not consistent: wordpress/test/1-verify-theme.spec.ts Line 76 in 2e63d93
wordpress/test/2-prepare-theme.spec.ts Line 94 in 2e63d93
|
Good catch 💪 You are correct, there is an error with a double path resolve, but the path creation and concatenation is proper in this context. Meaning - it should and must work.
You can see here wordpress/test/2-prepare-theme.spec.ts Line 52 in a7da74b
That the full path to the theme needs to be provided - so it's an error in the config. Your config: [
"@semantic-release/wordpress",
{
"type": "theme",
"slug" : "my-theme",
"withReadme": true,
"copyFiles": false,
"releasePath": "/tmp/wp-release",
"path": "./dist"
}
], Needs to be [
"@semantic-release/wordpress",
{
"type": "theme",
"slug" : "my-theme",
"withReadme": true,
"copyFiles": false,
"releasePath": "/tmp/wp-release",
"path": "./dist/my-theme"
}
], And then it should work. P.S. I corrected the error with the double |
Hi @seebeen, thanks for the immediate response.
i think because inside wordpress/lib/utils/verify-theme.ts Line 9 in 2e63d93
So the path in verify state is "./dist/my-theme/my-theme" and in prepare state is "./dist/my-theme" In my case the correct path is "./dist/my-theme".
For test this user case, the prepare.specs.ts and verify-theme.spec.ts must have the same options
|
Current behavior
hi @seebeen,
I generate my theme files inside the dist folder and I want the version to be replaced in this folder and then proceed to create the .zip file.
So i use this configuration
the verification step is successful but when the version replacement is carried out I get an error.
I think the file is not found because in
verify-theme.ts
the path is concatenated with the slugwordpress/lib/utils/verify-theme.ts
Line 9 in 2e63d93
however in
prepare.ts
the path is not concatenated with the slugwordpress/lib/prepare.ts
Line 28 in 2e63d93
My
style.css
is correctExpected behavior
The version is replaced and the zip is passed through a specific path
semantic-release
version22.0.5
CI environment
GitLab
Plugins used
"@semantic-release/wordpress": "^1.5.3",
"@semantic-release/changelog": "^6.0.3",
"@semantic-release/git": "^10.0.1",
"@semantic-release/gitlab": "^12.0.6",
semantic-release
configurationCI logs
The text was updated successfully, but these errors were encountered: