@addev-be/framework-utils 0.12.1 → 0.12.3

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.
@@ -105,6 +105,16 @@ export const replaceVersionInGitLabCi = (path, newVersion) => {
105
105
  writeFileSync(path, newFileContents);
106
106
  };
107
107
 
108
+ export const replaceVersionInDockerCompose = (path, newVersion) => {
109
+ console.log('Replacing version in Docker Compose file', path);
110
+ const fileContents = readFileSync(path, 'utf-8');
111
+ const newFileContents = fileContents.replace(
112
+ /image: ([^\:]+):\d+\.\d+\.\d+/g,
113
+ `image: $1:${newVersion}`
114
+ );
115
+ writeFileSync(path, newFileContents);
116
+ };
117
+
108
118
  export const getCurrentVersion = () => {
109
119
  const packageJson = JSON.parse(
110
120
  readFileSync(join(__dirname, 'package.json'), 'utf-8')
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@addev-be/framework-utils",
3
- "version": "0.12.1",
3
+ "version": "0.12.3",
4
4
  "type": "module",
5
5
  "export": {
6
6
  "node": {