From af2e25dce0aad287f861f51984227c8dc55db2c3 Mon Sep 17 00:00:00 2001 From: di-sukharev Date: Sun, 21 May 2023 11:36:06 +0800 Subject: [PATCH] build --- out/github-action.cjs | 3 ++- src/github-action.ts | 12 ++---------- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/out/github-action.cjs b/out/github-action.cjs index 19dae8e..7563e72 100644 --- a/out/github-action.cjs +++ b/out/github-action.cjs @@ -27287,8 +27287,9 @@ async function improveCommitMessagesWithRebase({ ce(`creating -F file for ${commit.sha}`); (0, import_fs2.writeFileSync)(`./${commit.sha}.txt`, improvedMessagesBySha[commit.sha]); }); + (0, import_fs2.writeFileSync)(`./rebase-exec.sh`, "cat .git/rebase-merge/stopped-sha"); await execPromise( - `git rebase ${commitsToImprove[0].sha}^ --exec "git commit --amend -F $(cat .git/rebase-merge/stopped-sha).txt"`, + `git rebase ${commitsToImprove[0].sha}^ --exec "git commit --amend -F ./rebase-exec.sh"`, { env: { GIT_SEQUENCE_EDITOR: 'sed -i -e "s/^pick/reword/g"', diff --git a/src/github-action.ts b/src/github-action.ts index d4909aa..69d0fe6 100644 --- a/src/github-action.ts +++ b/src/github-action.ts @@ -178,18 +178,10 @@ async function improveCommitMessagesWithRebase({ // } // ); - // writeFileSync( - // `./rebase-exec.sh`, - // ` - // #!/bin/bash - // count=$(cat count.txt) - // git commit --amend -F commit-$count.txt - // echo $(( count + 1 )) > count.txt - // ` - // ); + writeFileSync(`./rebase-exec.sh`, 'cat .git/rebase-merge/stopped-sha'); await execPromise( - `git rebase ${commitsToImprove[0].sha}^ --exec "git commit --amend -F $(cat .git/rebase-merge/stopped-sha).txt"`, + `git rebase ${commitsToImprove[0].sha}^ --exec "git commit --amend -F ./rebase-exec.sh"`, { env: { GIT_SEQUENCE_EDITOR: 'sed -i -e "s/^pick/reword/g"',