We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b371a92 commit c429879Copy full SHA for c429879
tools/bump-shared-core.sh
@@ -0,0 +1,20 @@
1
+#!/bin/bash
2
+
3
+set -euo pipefail
4
5
+# Usage: ./tools/bump-shared-core.sh [sha]
6
+# If sha is not provided, it defaults to the latest commit on the main branch of shared-core.
7
8
+if ! which cargo-upgrade >/dev/null 2>&1; then
9
+ echo "cargo-edit is not installed. Please install it with 'cargo install cargo-edit' and make sure that it's in your PATH."
10
+ exit 1
11
+fi
12
13
+shared_core_main=$(git ls-remote [email protected]:bitdriftlabs/shared-core.git main | awk '{print $1}')
14
+sha="${1:-$shared_core_main}"
15
16
+old_version=$(grep bd-api Cargo.toml | grep -Eo 'rev = ".*"' | cut -d' ' -f3 | tr -d '"')
17
18
+sed -i "s|\"$old_version\"|\"$sha\"|g" Cargo.toml
19
20
+cargo upgrade --incompatible
0 commit comments