Skip to content

Commit 2fb244e

Browse files
authored
ci: only use git fetch for nix jobs (#5506)
1 parent ca23146 commit 2fb244e

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

codebuild/bin/install_s2n_head.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,11 @@ if [[ "$IN_NIX_SHELL" ]]; then
3333
export EXTRA_BUILD_FLAGS=""
3434
# Work around issue cloning inside a nix devshell https://github.com/NixOS/nixpkgs/issues/299949
3535
export CLONE_SRC="."
36+
# Make sure main is available in our workspace.
37+
# This is a workaround for the merge queue workflow.
38+
git fetch origin
39+
git checkout main
40+
git checkout $CODEBUILD_SOURCE_VERSION
3641
else
3742
export DEST_DIR="$SRC_ROOT"/bin
3843
export EXTRA_BUILD_FLAGS="-DCMAKE_PREFIX_PATH=$LIBCRYPTO_ROOT"
@@ -52,11 +57,6 @@ if [[ -f "$s2nc_head" ]]; then
5257
fi
5358
fi
5459

55-
# Make sure main is available in our workspace.
56-
# This is a workaround for the merge queue workflow.
57-
git fetch origin
58-
git checkout main
59-
git checkout $CODEBUILD_SOURCE_VERSION
6060
git clone --branch "main" --single-branch "$CLONE_SRC" "$BUILD_DIR"
6161

6262
cmake "$BUILD_DIR" -B"$BUILD_DIR"/build "$EXTRA_BUILD_FLAGS" \

0 commit comments

Comments
 (0)