This repository has been archived on 2024-02-08. You can view files and clone it, but cannot push or open issues or pull requests.
frontend/scripts/version-update-package.sh

15 lines
403 B
Bash
Executable File

#!/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