Skip to content

Commit 3d34e59

Browse files
committed
Make the build script update existing branch checkouts
1 parent fe32ed5 commit 3d34e59

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

scripts/build_als.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,12 @@ function pin_crates() {
124124
git -C "subprojects/$crate" fetch origin
125125
fi
126126
git -C "subprojects/$crate" checkout "${commit:-${branch:-master}}"
127+
if [ -z "$commit" ]; then
128+
# If no specific commit was requested, a branch is used. The previous
129+
# checkout command would simply switch to it but not update it from
130+
# remote. So let's do that update.
131+
git -C "subprojects/$crate" pull origin "${branch:-master}"
132+
fi
127133
cp -v "subprojects/$crate".toml "subprojects/$crate/alire.toml"
128134

129135
# Instead of calling `alr pin` for each crate, it's more efficient to

0 commit comments

Comments
 (0)