@iwavesmedia/semantic-release-composer 1.0.0 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/README.md +4 -4
- package/package.json +2 -2
- package/src/index.js +8 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
# [1.1.0](https://github.com/ambimax/semantic-release-composer/compare/v1.0.2...v1.1.0) (2024-07-31)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* update composer.lock when composer.json is modified ([625853a](https://github.com/ambimax/semantic-release-composer/commit/625853a377a8844918120187fe3edc2e23e069a1))
|
|
7
|
+
|
|
1
8
|
## [1.0.2](https://github.com/ambimax/semantic-release-composer/compare/v1.0.1...v1.0.2) (2021-02-02)
|
|
2
9
|
|
|
3
10
|
|
package/README.md
CHANGED
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
[**semantic-release**](https://github.com/semantic-release/semantic-release) plugin to update a
|
|
4
4
|
[composer](https://getcomposer.org/) package for php.
|
|
5
5
|
|
|
6
|
-
| Step | Description
|
|
7
|
-
| ------------------ |
|
|
8
|
-
| `verifyConditions` | Verify the presence of a composer.json file.
|
|
9
|
-
| `prepare` | Update the `composer.json` version
|
|
6
|
+
| Step | Description |
|
|
7
|
+
| ------------------ | -------------------------------------------------------------------------- |
|
|
8
|
+
| `verifyConditions` | Verify the presence of a composer.json file. |
|
|
9
|
+
| `prepare` | Update the `composer.json` version & sync composer.lock file if it exists. |
|
|
10
10
|
|
|
11
11
|
## Install
|
|
12
12
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@iwavesmedia/semantic-release-composer",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "[**semantic-release**](https://github.com/semantic-release/semantic-release) plugin to update a [composer](https://getcomposer.org/) package for php.",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
},
|
|
17
17
|
"author": "IWAVES Medientechnik e.U.",
|
|
18
18
|
"contributors": [
|
|
19
|
-
"
|
|
19
|
+
"Marc Peternell <marc.peternell@iwavesmedia.com> (https://github.com/itscark)"
|
|
20
20
|
],
|
|
21
21
|
"repository": {
|
|
22
22
|
"type": "git",
|
package/src/index.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
const fs = require('fs');
|
|
2
|
+
const childProcess = require('child_process');
|
|
2
3
|
const SemanticReleaseError = require('@semantic-release/error');
|
|
3
4
|
|
|
4
5
|
let verified;
|
|
@@ -49,6 +50,13 @@ async function prepare(pluginConfig, context) {
|
|
|
49
50
|
fs.writeFileSync(composerJsonFile, JSON.stringify(data, null, 4));
|
|
50
51
|
|
|
51
52
|
logger.log('Prepared composer.json');
|
|
53
|
+
|
|
54
|
+
const composerLockFile = `${cwd}/composer.lock`;
|
|
55
|
+
if (fs.existsSync(composerLockFile)) {
|
|
56
|
+
// update lock file with new version
|
|
57
|
+
logger.log('Updating version %s in %s ', version, composerLockFile);
|
|
58
|
+
childProcess.execSync('composer update --lock');
|
|
59
|
+
}
|
|
52
60
|
}
|
|
53
61
|
|
|
54
62
|
module.exports = { verifyConditions, prepare };
|