Skip to content

Commit d2dfa5d

Browse files
committed
Add make command for updating all lock files
Signed-off-by: Ryan Levick <[email protected]>
1 parent 57b004c commit d2dfa5d

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
- name: Run lints
3939
run: |
4040
BUILD_SPIN_EXAMPLES=0 make lint
41-
git diff --name-status --exit-code . || (echo "Git working tree dirtied by lints. Run `make lint` and check in changes" && exit 1)
41+
git diff --name-status --exit-code . || (echo "Git working tree dirtied by lints. Run 'make update-cargo-locks' and check in changes" && exit 1)
4242
4343
- name: Cancel everything if linting fails
4444
if: failure()

Makefile

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,16 @@ lint-rust-examples-and-testcases:
6565
|| exit 1 ; \
6666
done
6767

68+
## Bring all of the checked in `Cargo.lock` files up-to-date
69+
.PHONY: update-cargo-locks
70+
update-cargo-locks:
71+
echo "Updating Cargo.toml"
72+
cargo update -w --offline; \
73+
for manifest_path in $$(find examples tests/testcases -name Cargo.toml); do \
74+
echo "Updating $${manifest_path}" && \
75+
cargo update --manifest-path "$${manifest_path}" -w --offline; \
76+
done
77+
6878
.PHONY: test-unit
6979
test-unit:
7080
RUST_LOG=$(LOG_LEVEL) cargo test --all --no-fail-fast -- --skip integration_tests --skip spinup_tests --skip cloud_tests --nocapture

0 commit comments

Comments
 (0)