-
Notifications
You must be signed in to change notification settings - Fork 789
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
Can I use standard-version for composer-based php projects? #844
Comments
At a glance, it looks like you are running into a few different issues. For your {
"bumpFiles": [
{
"filename": "rwfm-version-tracker.txt",
"updater": "standard-version-composer-updater.js"
}
]
} The module-related errors you are seeing ( We'll likely move to support ESM in an upcoming release (#837), just not quite there yet. |
@jbottigliero Thank you very much for your help! All the issues you mentioned are a total hit, and after applying them, the scripts works! That's great! 👍 Would you have any suggestions on how to approach the php array? module.exports.readVersion = function (contents) {
let lines = contents.split('\n')
let version = null
lines.forEach(line => {
if (line.includes("'version' => '")) {
version = line.match(/'((\d|\.)+)'/)[1]
}
})
return version
} However, I have no idea (yet) how to write back the version... (I also tried php-parser, but it ignores recognising the way the ext_emconf.php file is written .. at least I couldn't get the php parser to do its work...) |
Maybe you can try to read the version from the I don't remember PHP syntax very well, there is pseudo-code:
|
I would like to manage my release versions of my php projects locally. The version is such projects is in 2 files, a composer file, and - CMS specific - a
ext-emconf.php
file, which has an ARRAY (not a JSON) like this:Would that be at all possible?
So far I have (testing with a simple text file first):
// .versionrc
// standard-version-composer-updater.js
All these files are at the root level.
Currently I get this:
If I change all requires to imports
I get
I am confused...
The text was updated successfully, but these errors were encountered: