@docupace/pipeline 1.0.39-matttest.32 → 1.0.39-matttest.33

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@docupace/pipeline",
3
- "version": "1.0.39-matttest.32",
3
+ "version": "1.0.39-matttest.33",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -74,8 +74,12 @@ async function commitTag() {
74
74
  const newVersion = (
75
75
  await $`node -p "require('./package.json').version"`
76
76
  ).stdout.trim();
77
+
78
+ const { stdout } = await $`git symbolic-ref refs/remotes/origin/HEAD`;
79
+ const defaultBranch = stdout.trim().replace('refs/remotes/origin/', '');
80
+
77
81
  await $`git commit -m "Version bump to ${newVersion} and changelog"`;
78
- await $`git push origin`;
82
+ await $`git push origin ${defaultBranch}`;
79
83
  await $`git tag v${newVersion}`;
80
84
  await $`git push origin --tags`;
81
85
  console.log(`✅ Version ${newVersion} tagged and pushed.`);
package/src/next/cli.js CHANGED
@@ -131,6 +131,16 @@ program
131
131
  await deployAppWithTag(application, env, site, deployTag);
132
132
  });
133
133
 
134
+ program
135
+ .command('deploy-mono-app <tag> <application>')
136
+ .description('Deploy an application for a specific site')
137
+ .action(async (tag, application) => {
138
+ const deployTag = await getDeployTag(tag);
139
+ const version = deployTag.split('@')[1];
140
+ const { env, site } = await getDefaultDeploySite(version);
141
+ await deployAppWithTag(application, env, site, version);
142
+ });
143
+
134
144
  program
135
145
  .command('deploy-core <env> <site>')
136
146
  .description('Deploy Core')
@@ -266,9 +266,9 @@ export async function writeAndPushDeployConfig(
266
266
  * @param {string} site - The site name.
267
267
  */
268
268
 
269
- export async function getDeployTag() {
269
+ export async function getDeployTag(prefix = 'v') {
270
270
  const gitTag = (
271
- await $`git tag --points-at HEAD | grep '^v' | head -n 1`
271
+ await $`git tag --points-at HEAD | grep '^${prefix}' | head -n 1`
272
272
  ).stdout.trim();
273
273
  const deployTag = gitTag || `build-${process.env.BITBUCKET_BUILD_NUMBER}`;
274
274
  return deployTag;