Skip to content

Commit

Permalink
Remove checking out main (#1117)
Browse files Browse the repository at this point in the history
* Remove checking out main

* Account for both branches existing or not
  • Loading branch information
jonathanKingston authored Oct 17, 2024
1 parent 205d2de commit c74c219
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
3 changes: 2 additions & 1 deletion .github/scripts/diff-directories.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@ function displayDiffs (dir1Files, dir2Files, isOpen) {
}
const outString = Object.keys(rollupGrouping).map(key => {
const rollup = rollupGrouping[key]
let outString = ''
let outString = `
`
let title = key
if (rollup.files.length) {
for (const file of rollup.files) {
Expand Down
15 changes: 13 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,19 @@ jobs:
- name: Fetch files and checkout
run: |
git fetch origin
git checkout -b main origin/main
git checkout -b releases origin/releases
# Check if the 'main' branch exists, if not, create it
if git rev-parse --verify main >/dev/null 2>&1; then
git checkout main
else
git checkout -b main origin/main
fi
# Check if the 'releases' branch exists, if not, create it
if git rev-parse --verify releases >/dev/null 2>&1; then
git checkout releases
else
git checkout -b releases origin/releases
fi
# Checkout the code of main onto releases
git checkout main -- .
- name: Build release
Expand Down

0 comments on commit c74c219

Please sign in to comment.