Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,26 @@ jobs:
fi
install -m 0755 "${BIN}" "${PKG_DIR}/${BINARY_NAME}"

# npm always ships README and LICENSE regardless of `files`, so
# placing them is enough. Without them the package page renders
# empty and npm reports the package as unlicensed.
LICENSE_SRC=$(find extract -type f -name LICENSE -print -quit)
if [[ -n "${LICENSE_SRC}" ]]; then
install -m 0644 "${LICENSE_SRC}" "${PKG_DIR}/LICENSE"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Used Linux as primary OS for many years and I've never used the install command (https://manpages.ubuntu.com/manpages/jammy/man1/install.1.html) - seems valuable when copying the binary above as its able to set the +x flag in a single invocation, but here it's kind of weird to not simply use a cp 🤔

fi

# Deliberately not the repository README: this package is not one
# users install directly, so it gets a note saying so.
cat > "${PKG_DIR}/README.md" <<README
# ${PLATFORM_PKG}

Platform-specific binary for [\`@elevenlabs/cli\`](https://www.npmjs.com/package/@elevenlabs/cli)
on ${SUFFIX}.

Do not install this directly — install \`@elevenlabs/cli\`, which selects
the right platform package for you.
README

cat > "${PKG_DIR}/package.json" <<PKGJSON
{
"name": "${PLATFORM_PKG}",
Expand Down Expand Up @@ -417,6 +437,11 @@ jobs:
}
PKGJSON

# The page users actually land on, so it gets the repository README
# from the tagged commit. npm ships both regardless of `files`.
cp README.md "${PKG_DIR}/README.md"
cp LICENSE "${PKG_DIR}/LICENSE"

# Write launcher script
mkdir -p "${PKG_DIR}/bin"
cat > "${PKG_DIR}/bin/cli.js" <<'LAUNCHER'
Expand Down
Loading