File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -41,9 +41,25 @@ update_package_json() {
4141 mv " $temp_file " " $file "
4242}
4343
44+ update_package_json_version () {
45+ local file=$1
46+ echo " Updating version in $file ..."
47+
48+ # Get the version from packages/cli/package.json
49+ CLI_VERSION=$( jq -r ' .version' packages/cli/package.json)
50+ echo " Using CLI version: $CLI_VERSION "
51+
52+ # Update the version in the package.json file
53+ jq --arg version " $CLI_VERSION " ' .version = $version' " $file " > " $temp_file "
54+
55+ # Replace the original file with the updated one
56+ mv " $temp_file " " $file "
57+ }
58+
4459# Find all package.json files in templates directory and update them
4560find ./templates -name " package.json" -not -path " */node_modules/*" | while read -r file; do
4661 update_package_json " $file "
62+ update_package_json_version " $file "
4763done
4864
4965# Find all package.json files in packages/*/template directories and update them
You can’t perform that action at this time.
0 commit comments