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 +7 -3
- package/package.json +1 -1
- package/src/git.ts +10 -5
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
|
-
|
|
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
|
-
|
|
74
|
+
`${remoteName}/${fromBranch}..${remoteName}/${toBranch}`,
|
|
75
75
|
])).all;
|
|
76
76
|
if (commitsBehind.length > 0) {
|
|
77
|
-
log.info(`\
|
|
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
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
|
-
|
|
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
|
-
|
|
156
|
+
`${remoteName}/${fromBranch}..${remoteName}/${toBranch}`,
|
|
157
157
|
])
|
|
158
158
|
).all;
|
|
159
159
|
|
|
160
160
|
if (commitsBehind.length > 0) {
|
|
161
|
-
log.info(
|
|
162
|
-
|
|
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}`,
|