Created
August 2, 2021 21:55
-
-
Save VottusCode/93e078a57aa07e24ed25bb888f62a252 to your computer and use it in GitHub Desktop.
prisma-client-go binaries/publish.sh without the publish stuff
This file contains hidden or 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
#!/bin/sh | |
set -eux | |
v="$1" | |
mkdir -p build | |
cd build | |
npm init --yes | |
npm i "pkg" --dev | |
npm i "prisma@$v" --dev | |
npm i "@prisma/client@$v" | |
npx prisma version | |
mkdir -p node_modules/prisma/node_modules/@prisma/engines | |
cp -R node_modules/@prisma/engines/* node_modules/prisma/node_modules/@prisma/engines | |
npx pkg -t node12-linux,node12-darwin,node12-win node_modules/prisma | |
version=$(npx prisma version | grep '^\(prisma \)' | cut -d : -f 2 | cut -d " " -f 2) | |
mv prisma-macos "prisma-cli-$version-darwin" | |
mv prisma-linux "prisma-cli-$version-linux" | |
mv prisma-win.exe "prisma-cli-$version-windows.exe" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment