#!/bin/sh # This script updates the version field in the packges.json new_version=$(./get_version_string.sh) # ensure packages are installed if ! command -v jq &> /dev/null; then echo "Error: jq is not installed. Please install jq and try again." exit 1 fi # Update the version field in package.json jq '.version = "'$new_version'"' package.json > package.json.tmp mv package.json.tmp package.json