Skip to content

Commit 952771b

Browse files
committed
+
1 parent d04cd1e commit 952771b

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed

.github/workflows/release-feature-branch.yaml

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)