Commit b4b97dad authored by Pierre Boutillier's avatar Pierre Boutillier

Fix identity.json preservation in docker images after a reset

parent c80ab663
Pipeline #49447829 passed with stages
in 8 minutes and 15 seconds
......@@ -58,15 +58,16 @@ launch_node() {
fi
if [ "$local_data_version" != "$image_version" ]; then
echo "Removing outdated chain data..."
if [ -f "$node_data_dir/identities.json" ]; then \
mv "$node_data_dir/identities.json" /tmp
if [ -f "$node_data_dir/identity.json" ]; then \
mv "$node_data_dir/identity.json" /tmp
fi
rm -rf "$node_data_dir"
rm -rf "$client_dir/blocks"
rm -rf "$client_dir/nonces"
rm -rf "$client_dir/endorsements"
if [ -f "/tmp/identities.json" ]; then \
mv /tmp/identities.json "$node_data_dir/"
if [ -f "/tmp/identity.json" ]; then \
mkdir -p "$node_data_dir"
mv /tmp/identity.json "$node_data_dir/"
fi
cp "/usr/local/share/tezos/alphanet_version" \
"$node_dir/alphanet_version"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment