From c47f4e4719aaa02d14c81e9b7b8e99bbf1234eb2 Mon Sep 17 00:00:00 2001 From: Chris Deacy Date: Sun, 27 Oct 2019 12:40:52 -0700 Subject: [PATCH] Fix rebuild script --- gh-actions/rebuild.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/gh-actions/rebuild.js b/gh-actions/rebuild.js index e8574e0..74266d5 100644 --- a/gh-actions/rebuild.js +++ b/gh-actions/rebuild.js @@ -1,6 +1,5 @@ -const { AUTHOR_EMAIL, AUTHOR_NAME, GITHUB_TOKEN, REF, REPO } = process.env - const { execSync } = require('child_process') +const { AUTHOR_EMAIL, AUTHOR_NAME, GITHUB_TOKEN, REF, REPO } = process.env const remoteUrl = `https://x-access-token:${GITHUB_TOKEN}@github.com/${REPO}.git` const branchName = REF.split('/')[2] @@ -23,11 +22,10 @@ if (getChangedFiles().includes('index.js')) { `git config user.name "${AUTHOR_NAME}"`, `git remote add gh-action ${remoteUrl}`, `git fetch gh-action ${branchName}`, - `git branch --set-upstream-to gh-action/${branchName}`, // push change `git add index.js`, `git commit -m "[gh-actions/rebuild] Rebuild index.js"`, - `git push`, + `git push gh-action HEAD:${branchName}`, ].join(' && ') ) } else {