diff --git a/.github/scripts/diff-directories.js b/.github/scripts/diff-directories.js index d184d228a..fd1650f3e 100644 --- a/.github/scripts/diff-directories.js +++ b/.github/scripts/diff-directories.js @@ -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) { diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d066942ef..861059763 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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