-
-
Notifications
You must be signed in to change notification settings - Fork 103
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci(publish-cli): create PR on new version
- Loading branch information
Showing
3 changed files
with
26 additions
and
2 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
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
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 |
---|---|---|
|
@@ -36,7 +36,10 @@ cp -R node_modules/@prisma/engines/* node_modules/prisma/node_modules/@prisma/en | |
|
||
npx pkg -t node18-linuxstatic-x64,node18-darwin-x64,node18-win-x64,node18-linuxstatic-arm64,node18-darwin-arm64,node18-win-arm64 node_modules/prisma | ||
|
||
export PRISMA_HIDE_UPDATE_MESSAGE=true | ||
|
||
version=$(npx prisma version | grep '^\(prisma \)' | cut -d : -f 2 | cut -d " " -f 2) | ||
hash=$(npx prisma version | grep '^\(Default Engines Hash\)' | cut -d : -f 2 | cut -d " " -f 2) | ||
|
||
# abort if the installed version does not equal the release version | ||
if [ "$version" != "$v" ]; then | ||
|
@@ -82,4 +85,17 @@ aws s3 cp "$processed_name" "s3://$S3_BUCKET" --acl public-read | |
cd .. | ||
rm -r out/ | ||
|
||
cd .. | ||
|
||
echo "Successfully published Prisma CLI $version" | ||
|
||
if [[ $CI == 'true' ]]; then | ||
echo "Committing changes" | ||
git config user.name 'GitHub Actions' | ||
git config user.email '[email protected]' | ||
|
||
sed -i '' -e "s/const EngineVersion = \".*\"/const EngineVersion = \"$hash\"/g" binaries.go | ||
sed -i '' -e "s/const PrismaVersion = \".*\"/const PrismaVersion = \"$version\"/g" binaries.go | ||
|
||
# changes are picked up by GitHub actions | ||
fi |