# make sure we have package info

if [[ -z $PACKAGE_NAME ]]; then
	msg -notice "reading package name from Cargo.toml"
	PACKAGE_NAME="$(yq .package.name Cargo.toml)"
	if (($?)); then die "failed to parse package name"; fi
fi

if [[ -z "$PACKAGE_VERSION" ]]; then
	msg "reading package name from Cargo.toml"
	PACKAGE_VERSION="$(yq .package.version Cargo.toml)"
	if (($?)); then die "failed to parse package name"; fi
fi
