Skip to content

Commit

Permalink
Delete access token file after reading in mergeToMain.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
patchwork01 committed Nov 24, 2023
1 parent c8a498f commit 44f2243
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions scripts/test/nightly/mergeToMain.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,12 @@ ACCESS_TOKEN_FILE=$(mktemp)
mvn exec:java -q \
-Dexec.mainClass="sleeper.build.github.app.GenerateGitHubAppInstallationAccessToken" \
-Dexec.args="$PRIVATE_KEY $APP_ID $INSTALLATION_ID $ACCESS_TOKEN_FILE"
popd

ACCESS_TOKEN=$(<"$ACCESS_TOKEN_FILE")
rm "$ACCESS_TOKEN_FILE"
popd
popd

git remote set-url origin "https://x-access-token:$ACCESS_TOKEN@github.com/$REPO_PATH.git"
git switch --discard-changes -C main origin/main
git pull
Expand All @@ -49,5 +52,3 @@ git push
git remote set-url origin "https://github.com/$REPO_PATH.git"
git fetch
git switch --discard-changes -C develop origin/develop

popd

0 comments on commit 44f2243

Please sign in to comment.