forked from solana-labs/solana-program-library
-
Notifications
You must be signed in to change notification settings - Fork 0
/
update-solana-dependencies.sh
executable file
·89 lines (83 loc) · 2.09 KB
/
update-solana-dependencies.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
#!/usr/bin/env bash
#
# Updates the solana version in all the SPL crates
#
solana_ver=$1
if [[ -z $solana_ver ]]; then
echo "Usage: $0 <new-solana-version>"
exit 1
fi
cd "$(dirname "$0")"
source ./ci/solana-version.sh
old_solana_ver=${solana_version#v}
sed -i'' -e "s#solana_version=v.*#solana_version=v${solana_ver}#" ./ci/solana-version.sh
sed -i'' -e "s#solana_version = \".*\"#solana_version = \"${solana_ver}\"#" ./Anchor.toml
declare tomls=()
while IFS='' read -r line; do tomls+=("$line"); done < <(find . -name Cargo.toml)
crates=(
solana-account-decoder
solana-banks-client
solana-banks-interface
solana-banks-server
solana-bloom
solana-bucket-map
solana-clap-utils
solana-clap-v3-utils
solana-cli-config
solana-cli-output
solana-client
solana-connection-cache
solana-core
solana-entry
solana-faucet
solana-frozen-abi
solana-frozen-abi-macro
solana-geyser-plugin-interface
solana-geyser-plugin-manager
solana-gossip
solana-ledger
solana-logger
solana-measure
solana-merkle-tree
solana-metrics
solana-net-utils
solana-perf
solana-poh
solana-program-runtime
solana-program-test
solana-address-lookup-table-program
solana-bpf-loader-program
solana-compute-budget-program
solana-config-program
solana-stake-program
solana-vote-program
solana-zk-token-proof-program
solana-pubsub-client
solana-quic-client
solana-rayon-threadlimit
solana-remote-wallet
solana-rpc
solana-rpc-client
solana-rpc-client-api
solana-rpc-client-nonce-utils
solana-runtime
solana-sdk
solana-sdk-macro
solana-program
solana-send-transaction-service
solana-storage-bigtable
solana-storage-proto
solana-streamer
solana-test-validator
solana-thin-client
solana-tpu-client
solana-transaction-status
solana-udp-client
solana-version
solana-zk-token-sdk
)
set -x
for crate in "${crates[@]}"; do
sed -E -i'' -e "s:(${crate} = \")([=<>]*)${old_solana_ver}([^\"]*)\".*:\1\2${solana_ver}\3\":" "${tomls[@]}"
sed -E -i'' -e "s:(${crate} = \{ version = \")([=<>]*)${old_solana_ver}([^\"]*)(\".*):\1\2${solana_ver}\3\4:" "${tomls[@]}"
done