Skip to content

Commit 3f0a6b9

Browse files
Update workflows from templates. (#60)
1 parent b7e851a commit 3f0a6b9

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

.github/bump-version.sh

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,8 +136,7 @@ for FILE in ${VERSFILES} ; do
136136

137137
# If there's a Cargo.lock, update it also.
138138
if [ -f "${DIR}/Cargo.lock" ] ; then
139-
( cd "${DIR}" && cargo fetch )
140-
git add "${DIR}/Cargo.lock"
139+
CARGO_LOCKS="${CARGO_LOCKS} ${DIR}"
141140
fi
142141
;;
143142

@@ -197,6 +196,12 @@ for FILE in ${VERSFILES} ; do
197196
fi
198197
done
199198

199+
# If there are Cargo.lock files, we need to run "cargo fetch" after all the Cargo.toml files have been edited.
200+
for DIR in ${CARGO_LOCKS} ; do
201+
( cd "${DIR}" && cargo fetch )
202+
git add "${DIR}/Cargo.lock"
203+
done
204+
200205
# Look for files that have been changed, but that we haven't told git about.
201206
echo "Checking for modified but untracked files:"
202207
if git status -s | grep -qEv '^M ' ; then

0 commit comments

Comments
 (0)