@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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/next/deploy.js +10 -5
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@docupace/pipeline",
3
- "version": "1.0.23.test10",
3
+ "version": "1.0.23.test12",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -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=${getComparedVersion}`,
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 ${filePath}`;
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(