Skip to content

Commit

Permalink
chore(update): make sure to keep driver adapaters pkg in sync (#4238)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jolg42 authored Nov 13, 2023
1 parent e13ecbf commit 97c83aa
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 7 deletions.
8 changes: 1 addition & 7 deletions renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,8 @@
"prConcurrentLimit": 17,
"rebaseWhen": "auto",
"configMigration": true,
"ignoreDeps": ["prisma", "@prisma/client", "@prisma/instrumentation"],
"ignoreDeps": ["prisma", "@prisma/client", "@prisma/instrumentation", "@prisma/adapter-planetscale", "@prisma/adapter-pg", "@prisma/adapter-neon", "@prisma/adapter-libsql"],
"packageRules": [
{
"groupName": "Prisma Driver Adapters",
"matchPackageNames": ["@prisma/driver-adapter-utils"],
"matchPackagePatterns": ["@prisma/adapter*"],
"schedule": ["at any time"]
},
{
"groupName": "svelte packages",
"matchPackagePatterns": ["svelte"]
Expand Down
15 changes: 15 additions & 0 deletions scripts/update-version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,24 @@

CLI_PKG_VERSION=$(node -e "const pkg = require('./package.json'); console.log(pkg?.devDependencies?.['prisma'] || pkg?.dependencies?.['prisma'] || pkg?.resolutions?.['prisma'] || '')")
CLIENT_PKG_VERSION=$(node -e "const pkg = require('./package.json'); console.log(pkg?.devDependencies?.['@prisma/client'] || pkg?.dependencies?.['@prisma/client'] || pkg?.resolutions?.['@prisma/client'] || '')")

INSTRUMENTATION_PKG_VERSION=$(node -e "const pkg = require('./package.json'); console.log(pkg?.devDependencies?.['@prisma/instrumentation'] || pkg?.dependencies?.['@prisma/instrumentation'] || pkg?.resolutions?.['@prisma/instrumentation'] || '')")

ADAPTER_PLANETSCALE_VERSION=$(node -e "const pkg = require('./package.json'); console.log(pkg?.devDependencies?.['@prisma/adapter-planetscale'] || pkg?.dependencies?.['@prisma/adapter-planetscale'] || pkg?.resolutions?.['@prisma/adapter-planetscale'] || '')")
ADAPTER_PG_VERSION=$(node -e "const pkg = require('./package.json'); console.log(pkg?.devDependencies?.['@prisma/adapter-pg'] || pkg?.dependencies?.['@prisma/adapter-pg'] || pkg?.resolutions?.['@prisma/adapter-pg'] || '')")
ADAPTER_NEON_VERSION=$(node -e "const pkg = require('./package.json'); console.log(pkg?.devDependencies?.['@prisma/adapter-neon'] || pkg?.dependencies?.['@prisma/adapter-neon'] || pkg?.resolutions?.['@prisma/adapter-neon'] || '')")
ADAPTER_LIBSQL_VERSION=$(node -e "const pkg = require('./package.json'); console.log(pkg?.devDependencies?.['@prisma/adapter-libsql'] || pkg?.dependencies?.['@prisma/adapter-libsql'] || pkg?.resolutions?.['@prisma/adapter-libsql'] || '')")


CURRENT_DIR=$(pwd)

if [ -n "$CLI_PKG_VERSION" ]; then sed -i "s/$CLI_PKG_VERSION/$1/g" package.json; fi
if [ -n "$CLIENT_PKG_VERSION" ]; then sed -i "s/$CLIENT_PKG_VERSION/$1/g" package.json; fi

if [ -n "$INSTRUMENTATION_PKG_VERSION" ]; then sed -i "s/$INSTRUMENTATION_PKG_VERSION/$1/g" package.json; fi

if [ -n "$ADAPTER_PLANETSCALE_VERSION" ]; then sed -i "s/$ADAPTER_PLANETSCALE_VERSION/$1/g" package.json; fi
if [ -n "$ADAPTER_PG_VERSION" ]; then sed -i "s/$ADAPTER_PG_VERSION/$1/g" package.json; fi
if [ -n "$ADAPTER_NEON_VERSION" ]; then sed -i "s/$ADAPTER_NEON_VERSION/$1/g" package.json; fi
if [ -n "$ADAPTER_LIBSQL_VERSION" ]; then sed -i "s/$ADAPTER_LIBSQL_VERSION/$1/g" package.json; fi

0 comments on commit 97c83aa

Please sign in to comment.