Skip to content

Commit 8be2765

Browse files
committed
checkout to specified branch
1 parent fe25831 commit 8be2765

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed

.github/workflows/stable-macos.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ on:
1212
checkout_pr:
1313
type: string
1414
description: Checkout PR
15+
void_commit:
16+
type: string
17+
description: Checkout specific Void commit
18+
1519
repository_dispatch:
1620
types: [stable]
1721
push:
@@ -72,6 +76,8 @@ jobs:
7276
if: env.VSCODE_ARCH == 'x64'
7377

7478
- name: Clone VSCode repo
79+
env:
80+
VOID_COMMIT: ${{ github.event.inputs.void_commit }}
7581
run: . get_repo.sh
7682

7783
- name: Check PR or cron

get_repo.sh

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,16 @@ cd vscode || { echo "'vscode' dir not found"; exit 1; }
3333
git init -q
3434
git remote add origin https://github.com/voideditor/void.git
3535

36-
git fetch --depth 1 origin "${VOID_BRANCH}"
37-
git checkout FETCH_HEAD
36+
if [[ -n "${VOID_COMMIT}" ]]; then
37+
echo "Using explicit commit ${VOID_COMMIT}"
38+
# Fetch just that commit to keep the clone shallow.
39+
git fetch --depth 1 origin "${VOID_COMMIT}"
40+
git checkout "${VOID_COMMIT}"
41+
else
42+
git fetch --depth 1 origin "${VOID_BRANCH}"
43+
git checkout FETCH_HEAD
44+
fi
45+
3846

3947
MS_COMMIT=$VOID_BRANCH # VSCodium named this incorrectly, it should be called branch not commit
4048
MS_TAG=$( jq -r '.voidVersion' "product.json" )

0 commit comments

Comments
 (0)