From 32c5a06f094fdaf1945d4a0d443419346e1b509c Mon Sep 17 00:00:00 2001 From: Anthony Ongaro <43623494+ajongaro@users.noreply.github.com> Date: Sat, 2 Nov 2024 23:10:54 -0400 Subject: [PATCH 1/2] Feature | TEST-123 | Various edits --- src/index.ts | 2 +- src/utils/gitHelpers.ts | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/index.ts b/src/index.ts index 663821c..c655ab0 100755 --- a/src/index.ts +++ b/src/index.ts @@ -47,7 +47,7 @@ async function run() { } // No commit ID provided, display git log for selection - commitId = await GitHelpers.selectCommitFromLog() + commitId = await GitHelpers.selectCommitFromLog(originBranch) if (!commitId) { console.error('No commit selected. Exiting.') process.exit(1) diff --git a/src/utils/gitHelpers.ts b/src/utils/gitHelpers.ts index cea88f1..7252e9a 100644 --- a/src/utils/gitHelpers.ts +++ b/src/utils/gitHelpers.ts @@ -54,11 +54,14 @@ async function promptForOriginBranch(): Promise { return originBranch } -export async function selectCommitFromLog(): Promise { +export async function selectCommitFromLog( + branchName: string +): Promise { console.log('') const git: SimpleGit = simpleGit() try { // Fetch the latest commits from the current branch + await git.pull('origin', branchName) const log = await git.log({ maxCount: 20 }) if (log.all.length === 0) { From 93f8ff07863dc0b8a62e2dd4020621804074a16e Mon Sep 17 00:00:00 2001 From: Anthony Ongaro <43623494+ajongaro@users.noreply.github.com> Date: Sat, 2 Nov 2024 23:13:10 -0400 Subject: [PATCH 2/2] Version bump 1.0.0 -> 1.0.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 21b6a0f..4c76a2b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "patchport", - "version": "1.0.0", + "version": "1.0.1", "description": "a deployment and development environment management utility", "main": "index.js", "bin": {