Skip to content

Commit 817bafc

Browse files
committed
Generate unscoped package name
Signed-off-by: Ian Lewis <[email protected]>
1 parent 78b01eb commit 817bafc

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

.github/workflows/scripts/e2e-utils.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,12 @@ e2e_npm_package_name() {
5757
# Convert the test workflow file name to the package name.
5858
# remove the file extension
5959
package_name="$(e2e_this_file | rev | cut -d'.' -f2- | rev)"
60+
has_scope=$(e2e_this_file | cut -d '.' -f5 | grep -v unscoped || true)
6061
# convert periods to hyphen
6162
package_name="${package_name//./-}"
62-
package_name="@slsa-framework/${package_name}"
63+
if [[ -z "$has_scope" ]]; then
64+
package_name="@slsa-framework/${package_name}"
65+
fi
6366
echo "${package_name}"
6467
}
6568

0 commit comments

Comments
 (0)