File tree Expand file tree Collapse file tree 1 file changed +11
-8
lines changed
Expand file tree Collapse file tree 1 file changed +11
-8
lines changed Original file line number Diff line number Diff line change @@ -51,17 +51,20 @@ jobs:
5151 )
5252
5353 for pkg in "${packages[@]}"; do
54- pushd "$pkg" >/dev/null
54+ pkg_dir="$pkg/dist"
55+ package_json="$pkg_dir/package.json"
5556
56- base_version="$(jq -r '.version' package.json)"
57- new_version="${base_version}-${suffix} "
58-
59- echo "Setting $pkg version to $new_version"
57+ if [[ ! -f "$package_json" ]]; then
58+ echo "WARN: $package_json not found, skipping "
59+ continue
60+ fi
6061
61- jq --arg v "$new_version" '.version = $v' package.json > package.json.tmp
62- mv package.json.tmp ./dist/package.json
62+ base_version="$( jq -r '.version' "$package_json")"
63+ new_version="${base_version}-${suffix}"
6364
64- popd >/dev/null
65+ echo "Setting $pkg dist version to $new_version"
66+ jq --arg v "$new_version" '.version = $v' "$package_json" > "$package_json.tmp"
67+ mv "$package_json.tmp" "$package_json"
6568 done
6669 # Upload compiled JS for tests to reuse
6770 - name : Upload build-dist
You can’t perform that action at this time.
0 commit comments