Skip to content

Commit 724e236

Browse files
committed
test release condition for specific package
1 parent b7da3e1 commit 724e236

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/bin/sh
2+
3+
# This script checks if the specified package has changesets in the current commit.
4+
5+
set -eu
6+
7+
if [ $# -lt 1 ]; then
8+
echo "Error: Package name is required as the first argument." >&2
9+
exit 1
10+
fi
11+
12+
PACKAGE_NAME=$1
13+
PACKAGE_CHANGES=$(node -e "require('@changesets/read').default(process.cwd()).then(result => console.log(result.flatMap(changeset => changeset.releases.flatMap(release => release.name)).includes('${PACKAGE_NAME}')))")
14+
15+
echo "${PACKAGE_CHANGES}"

0 commit comments

Comments
 (0)