Skip to content

Commit

Permalink
better error logging
Browse files Browse the repository at this point in the history
  • Loading branch information
WizardCM committed Oct 5, 2024
1 parent 2ae90d2 commit eb92221
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
- name: Build
run: npm run build
- name: Push
if: ${{ github.event_name == 'push' && github.ref_name == 'main' }}
if: ${{ github.event_name == 'push' }}
run: |
git config --global user.email "<>"
git config --global user.name "Build Bot"
Expand Down
11 changes: 8 additions & 3 deletions src/download.ts
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,7 @@ function pushChanges(detachedSubmodules: string[], submodules: string[]): void {
'UI/cmake/linux/com.obsproject.Studio.desktop',
'UI/frontend-plugins/*/data/locale/*-*.ini'
]) {
exec(`git add '${allowedPath}'`);
ACTIONS.info(exec(`git add '${allowedPath}'`));
}
for (const submodule of submodules) {
exec(`git add plugins/${submodule}`);
Expand All @@ -450,8 +450,13 @@ function pushChanges(detachedSubmodules: string[], submodules: string[]): void {
ACTIONS.info('No changes in main repository. Skipping push.');
return;
}
exec(`git commit -m '${STRINGS.git.commitTitle}'`);
exec('git push');
try {
ACTIONS.info(exec('git log --staged'));
exec(`git commit -m '${STRINGS.git.commitTitle}'`);
exec('git push');
} catch (e) {
ACTIONS.setFailed(e as Error);
}
}

(async () => {
Expand Down

0 comments on commit eb92221

Please sign in to comment.