summaryrefslogtreecommitdiffstats
path: root/ci/azure-patch-crates.yml
diff options
context:
space:
mode:
Diffstat (limited to 'ci/azure-patch-crates.yml')
-rw-r--r--ci/azure-patch-crates.yml16
1 files changed, 16 insertions, 0 deletions
diff --git a/ci/azure-patch-crates.yml b/ci/azure-patch-crates.yml
new file mode 100644
index 00000000..7bf96e60
--- /dev/null
+++ b/ci/azure-patch-crates.yml
@@ -0,0 +1,16 @@
+steps:
+ - script: |
+ set -e
+
+ # Remove any existing patch statements
+ mv Cargo.toml Cargo.toml.bck
+ sed -n '/\[patch.crates-io\]/q;p' Cargo.toml.bck > Cargo.toml
+
+ # Patch all crates
+ cat ci/patch.toml >> Cargo.toml
+
+ # Print `Cargo.toml` for debugging
+ echo "~~~~ Cargo.toml ~~~~"
+ cat Cargo.toml
+ echo "~~~~~~~~~~~~~~~~~~~~"
+ displayName: Patch Cargo.toml