mirror of
https://github.com/rust-lang/rust.git
synced 2026-01-24 23:17:31 +00:00
ci: Move lockfile updates to a script
This commit is contained in:
16
.github/workflows/dependencies.yml
vendored
16
.github/workflows/dependencies.yml
vendored
@@ -62,19 +62,9 @@ jobs:
|
||||
rustup toolchain install --no-self-update --profile minimal $TOOLCHAIN
|
||||
rustup default $TOOLCHAIN
|
||||
|
||||
- name: cargo update compiler & tools
|
||||
# Remove first line that always just says "Updating crates.io index"
|
||||
run: |
|
||||
echo -e "\ncompiler & tools dependencies:" >> cargo_update.log
|
||||
cargo update 2>&1 | sed '/crates.io index/d' | tee -a cargo_update.log
|
||||
- name: cargo update library
|
||||
run: |
|
||||
echo -e "\nlibrary dependencies:" >> cargo_update.log
|
||||
cargo update --manifest-path library/Cargo.toml 2>&1 | sed '/crates.io index/d' | tee -a cargo_update.log
|
||||
- name: cargo update rustbook
|
||||
run: |
|
||||
echo -e "\nrustbook dependencies:" >> cargo_update.log
|
||||
cargo update --manifest-path src/tools/rustbook/Cargo.toml 2>&1 | sed '/crates.io index/d' | tee -a cargo_update.log
|
||||
- name: cargo update
|
||||
run: ./src/tools/update-lockfile.sh
|
||||
|
||||
- name: upload Cargo.lock artifact for use in PR
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
|
||||
18
src/tools/update-lockfile.sh
Executable file
18
src/tools/update-lockfile.sh
Executable file
@@ -0,0 +1,18 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Updates the workspaces in `.`, `library` and `src/tools/rustbook`
|
||||
# Logs are written to `cargo_update.log`
|
||||
# Used as part of regular dependency bumps
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
echo -e "\ncompiler & tools dependencies:" > cargo_update.log
|
||||
# Remove first line that always just says "Updating crates.io index"
|
||||
cargo update 2>&1 | sed '/crates.io index/d' | \
|
||||
tee -a cargo_update.log
|
||||
echo -e "\nlibrary dependencies:" >> cargo_update.log
|
||||
cargo update --manifest-path library/Cargo.toml 2>&1 | sed '/crates.io index/d' | \
|
||||
tee -a cargo_update.log
|
||||
echo -e "\nrustbook dependencies:" >> cargo_update.log
|
||||
cargo update --manifest-path src/tools/rustbook/Cargo.toml 2>&1 | sed '/crates.io index/d' | \
|
||||
tee -a cargo_update.log
|
||||
Reference in New Issue
Block a user