#!/bin/sh
set -e # exit on error 

VERSION=$1
if [ -z "$VERSION" ]; then
  echo "Usage: $0 <version>"
  exit 1
fi

echo "Updating Cargo.toml to version $VERSION"
sed -i "s/^version = .*/version = \"$VERSION\"/" Cargo.toml

echo "Running cargo check"
cargo check --all-targets
