@docupace/pipeline 1.0.2-3.test10 โ 1.0.2-3.test12
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/package.json +1 -1
- package/src/next/deploy.js +10 -5
package/package.json
CHANGED
package/src/next/deploy.js
CHANGED
|
@@ -39,15 +39,19 @@ async function updateAndCommitConnectVersion(
|
|
|
39
39
|
let content = fs.readFileSync(filePath, 'utf8');
|
|
40
40
|
content = content.replace(
|
|
41
41
|
/IMAGE_VERSION=.*/,
|
|
42
|
-
`IMAGE_VERSION
|
|
42
|
+
`IMAGE_VERSION=git-commit-${getComparedVersion}`,
|
|
43
43
|
);
|
|
44
44
|
fs.writeFileSync(filePath, content, 'utf8');
|
|
45
45
|
|
|
46
46
|
// Git commands to stage, commit and push changes
|
|
47
|
-
await $`cd ${connectDeployPath}`;
|
|
48
|
-
await $`git add
|
|
49
|
-
await $`git commit -m "Update Connect version for ${toSite} in ${toEnv} to ${getComparedVersion}"`;
|
|
50
|
-
await $`git push`;
|
|
47
|
+
await $`cd ${connectDeployPath} && git config user.email "gitops@docupace.com"`;
|
|
48
|
+
await $`cd ${connectDeployPath} && git add .`;
|
|
49
|
+
await $`cd ${connectDeployPath} && git commit -m "Update Connect version for ${toSite} in ${toEnv} to ${getComparedVersion}"`;
|
|
50
|
+
await $`cd ${connectDeployPath} && git push`;
|
|
51
|
+
|
|
52
|
+
console.log('๐งน Cleaning up...');
|
|
53
|
+
await $`rm -rf ${connectDeployPath}`;
|
|
54
|
+
console.log('โ
Cleanup complete.');
|
|
51
55
|
} catch (error) {
|
|
52
56
|
console.error('Error updating Connect version:', error);
|
|
53
57
|
throw error;
|
|
@@ -429,6 +433,7 @@ export async function deployFromSite(
|
|
|
429
433
|
toSite,
|
|
430
434
|
);
|
|
431
435
|
if (getComparedVersion) {
|
|
436
|
+
console.log('Version to deploy is: ', getComparedVersion);
|
|
432
437
|
const connectDeployPath = await cloneRepository('connect-deploy');
|
|
433
438
|
// update target version set to git-commit-${getCommparedVersion}}
|
|
434
439
|
await updateAndCommitConnectVersion(
|