deploy-vir 0.2.1 → 0.2.2

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/dist/git.js CHANGED
@@ -49,7 +49,7 @@ export async function pushDeploy(git, { deployName, fromBranch, toBranch }, remo
49
49
  ])).latest, `Failed to get current commit for ${remoteName}/${fromBranch}`);
50
50
  /** Get commits that are on {@link toBranch} but not on {@link fromBranch}. */
51
51
  const commitsAhead = (await git.log([
52
- '${remoteName}/${toBranch}..${remoteName}/${fromBranch}',
52
+ `${remoteName}/${toBranch}..${remoteName}/${fromBranch}`,
53
53
  ])).all;
54
54
  if (!commitsAhead.length) {
55
55
  throw new KnownError('No commit diff: nothing to deploy!');
@@ -71,10 +71,14 @@ export async function pushDeploy(git, { deployName, fromBranch, toBranch }, remo
71
71
  log.error(`Push failed: ${extractErrorMessage(error)}`);
72
72
  /** Get commits that are on {@link toBranch} but not on {@link fromBranch}. */
73
73
  const commitsBehind = (await git.log([
74
- '${remoteName}/${fromBranch}..${remoteName}/${toBranch}',
74
+ `${remoteName}/${fromBranch}..${remoteName}/${toBranch}`,
75
75
  ])).all;
76
76
  if (commitsBehind.length > 0) {
77
- log.info(`\nThe following ${commitsBehind.length} commit${commitsBehind.length === 1 ? '' : 's'} are on ${logColors.bold}${toBranch}${logColors.reset} but not on ${logColors.bold}${fromBranch}${logColors.reset}:`);
77
+ log.info(`\nOnn ${logColors.bold}${fromBranch}${logColors.reset}:`);
78
+ commitsBehind.forEach((commit, index) => {
79
+ log.faint(` ${index + 1}. ${commit.hash.slice(0, 7)} (${commit.author_name}) - ${commit.message}`);
80
+ });
81
+ log.info(`\nOnn ${logColors.bold}${toBranch}${logColors.reset}:`);
78
82
  commitsBehind.forEach((commit, index) => {
79
83
  log.faint(` ${index + 1}. ${commit.hash.slice(0, 7)} (${commit.author_name}) - ${commit.message}`);
80
84
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "deploy-vir",
3
- "version": "0.2.1",
3
+ "version": "0.2.2",
4
4
  "description": "Deploy a branch to another branch with notifications.",
5
5
  "keywords": [
6
6
  "deploy",
package/src/git.ts CHANGED
@@ -126,7 +126,7 @@ export async function pushDeploy(
126
126
  /** Get commits that are on {@link toBranch} but not on {@link fromBranch}. */
127
127
  const commitsAhead = (
128
128
  await git.log([
129
- '${remoteName}/${toBranch}..${remoteName}/${fromBranch}',
129
+ `${remoteName}/${toBranch}..${remoteName}/${fromBranch}`,
130
130
  ])
131
131
  ).all;
132
132
 
@@ -153,14 +153,19 @@ export async function pushDeploy(
153
153
  /** Get commits that are on {@link toBranch} but not on {@link fromBranch}. */
154
154
  const commitsBehind = (
155
155
  await git.log([
156
- '${remoteName}/${fromBranch}..${remoteName}/${toBranch}',
156
+ `${remoteName}/${fromBranch}..${remoteName}/${toBranch}`,
157
157
  ])
158
158
  ).all;
159
159
 
160
160
  if (commitsBehind.length > 0) {
161
- log.info(
162
- `\nThe following ${commitsBehind.length} commit${commitsBehind.length === 1 ? '' : 's'} are on ${logColors.bold}${toBranch}${logColors.reset} but not on ${logColors.bold}${fromBranch}${logColors.reset}:`,
163
- );
161
+ log.info(`\nOnn ${logColors.bold}${fromBranch}${logColors.reset}:`);
162
+ commitsBehind.forEach((commit, index) => {
163
+ log.faint(
164
+ ` ${index + 1}. ${commit.hash.slice(0, 7)} (${commit.author_name}) - ${commit.message}`,
165
+ );
166
+ });
167
+
168
+ log.info(`\nOnn ${logColors.bold}${toBranch}${logColors.reset}:`);
164
169
  commitsBehind.forEach((commit, index) => {
165
170
  log.faint(
166
171
  ` ${index + 1}. ${commit.hash.slice(0, 7)} (${commit.author_name}) - ${commit.message}`,