-
Notifications
You must be signed in to change notification settings - Fork 913
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5da63d4
commit 74bf336
Showing
1 changed file
with
3 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,8 @@ set -exuo pipefail | |
rm -rf deno; mkdir deno | ||
cp -rp src/* deno | ||
|
||
# x-release-please-start-version | ||
PACKAGE_VERSION=$(node -p 'require("./package.json").version') | ||
|
||
cat << EOF > deno/README.md | ||
# OpenAI Node API Library - Deno build | ||
|
@@ -14,7 +15,7 @@ This is a build produced from https://github.com/openai/openai-node – please g | |
Usage: | ||
\`\`\`ts | ||
import OpenAI from "https://deno.land/x/[email protected]/mod.ts"; | ||
import OpenAI from "$(echo 'https://deno.land/x/[email protected]/mod.ts' | sed -E s/@\.+\\//@"$PACKAGE_VERSION"\\//)"; | ||
const client = new OpenAI(); | ||
\`\`\` | ||
|
@@ -25,7 +26,6 @@ Note that in many Deno environments, you can also do this: | |
import OpenAI from "npm:openai"; | ||
\`\`\` | ||
EOF | ||
# x-release-please-end | ||
|
||
rm deno/_shims/auto/*-node.ts | ||
for dir in deno/_shims deno/_shims/auto; do | ||
|