Skip to content

Commit 6763a59

Browse files
authored
Merge pull request #1450 from o1-labs/dw/update-doc-update-ocaml-node
Website: ci.yaml has been renamed into tests.yaml
2 parents 7b68f5d + d73a5cc commit 6763a59

File tree

2 files changed

+50
-10
lines changed

2 files changed

+50
-10
lines changed

website/docs/developers/getting-started.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ components:
137137

138138
You can run a different set of tests. The command `make help` will give you the
139139
whole set of targets. You can also visit the file
140-
[ci.yaml](https://github.com/o1-labs/mina-rust/blob/develop/.github/workflows/ci.yaml)
140+
[tests.yaml](https://github.com/o1-labs/mina-rust/blob/develop/.github/workflows/tests.yaml)
141141
to explore the targets used for testing in our continuous integration
142142
environment.
143143

website/docs/developers/scripts/update-ocaml-node.sh

Lines changed: 49 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,52 @@ shorter_old_hash=${old_hash:0:7}
3232
shorter_new_hash=${new_hash:0:7}
3333

3434
echo "Updating config_${old_hash} to config_${new_hash}"
35-
sed -i'' -e "s/config_${old_hash}/config_${new_hash}/g" \
36-
"${base_dir}"/node/testing/src/node/ocaml/config.rs \
37-
"${base_dir}"/node/testing/src/node/ocaml/mod.rs \
38-
"${base_dir}"/node/testing/src/scenarios/multi_node/basic_connectivity_peer_discovery.rs \
39-
"${base_dir}"/node/testing/src/scenarios/solo_node/basic_connectivity_accept_incoming.rs
40-
sed -i'' -e "s/${old_version}-${shorter_old_hash}/${new_version}-${shorter_new_hash}/g" \
41-
"${base_dir}"/.github/workflows/ci.yaml \
42-
"${base_dir}"/docker-compose.archive.devnet.compare.yml \
43-
"${base_dir}"/node/testing/src/node/ocaml/config.rs
35+
36+
# Check if config_${old_hash} pattern exists in the files
37+
config_files=(
38+
"${base_dir}/node/testing/src/node/ocaml/config.rs"
39+
"${base_dir}/node/testing/src/node/ocaml/mod.rs"
40+
"${base_dir}/node/testing/src/scenarios/multi_node/basic_connectivity_peer_discovery.rs"
41+
"${base_dir}/node/testing/src/scenarios/solo_node/basic_connectivity_accept_incoming.rs"
42+
)
43+
44+
config_pattern_found=false
45+
for file in "${config_files[@]}"; do
46+
if grep -q "config_${old_hash}" "$file"; then
47+
config_pattern_found=true
48+
break
49+
fi
50+
done
51+
52+
if [ "$config_pattern_found" = false ]; then
53+
echo "Error: No reference to 'config_${old_hash}' found in any of the expected files."
54+
echo "Expected files:"
55+
printf ' %s\n' "${config_files[@]}"
56+
exit 1
57+
fi
58+
59+
sed -i'' -e "s/config_${old_hash}/config_${new_hash}/g" "${config_files[@]}"
60+
61+
# Check if version-hash pattern exists in the files
62+
version_files=(
63+
"${base_dir}/.github/workflows/tests.yaml"
64+
"${base_dir}/docker-compose.archive.devnet.compare.yml"
65+
"${base_dir}/node/testing/src/node/ocaml/config.rs"
66+
)
67+
68+
version_pattern_found=false
69+
for file in "${version_files[@]}"; do
70+
if grep -q "${old_version}-${shorter_old_hash}" "$file"; then
71+
version_pattern_found=true
72+
break
73+
fi
74+
done
75+
76+
if [ "$version_pattern_found" = false ]; then
77+
echo "Error: No reference to '${old_version}-${shorter_old_hash}' found in any of the expected files."
78+
echo "Expected files:"
79+
printf ' %s\n' "${version_files[@]}"
80+
exit 1
81+
fi
82+
83+
sed -i'' -e "s/${old_version}-${shorter_old_hash}/${new_version}-${shorter_new_hash}/g" "${version_files[@]}"

0 commit comments

Comments
 (0)