From 0d69cf2e315b8b43a76da93d1a65d36510c450dd Mon Sep 17 00:00:00 2001 From: Karl Horky Date: Sat, 30 Mar 2024 18:09:22 +0100 Subject: [PATCH] Remove Windows libpg-query install in Docker cont. libpg-query compatible with Windows: https://github.com/launchql/libpg-query-node/issues/22#issuecomment-2026935958 --- docker/clone-and-preflight.ts | 38 ----------------------------------- 1 file changed, 38 deletions(-) diff --git a/docker/clone-and-preflight.ts b/docker/clone-and-preflight.ts index a0990005..abd8f1bc 100644 --- a/docker/clone-and-preflight.ts +++ b/docker/clone-and-preflight.ts @@ -99,44 +99,6 @@ if (projectUsesPostgresql) { console.log('Running migrations...'); await executeCommand('pnpm migrate up', { cwd: projectPath }); - - if ( - // Exit code of grep will be non-zero if the - // `"@ts-safeql/eslint-plugin":` string is not found in - // package.json, indicating that SafeQL has not been - // installed - ( - await execaCommand( - 'grep package.json -e \'"@ts-safeql/eslint-plugin":\'', - { - cwd: projectPath, - shell: true, - reject: false, - }, - ) - ).exitCode !== 0 - ) { - console.log( - 'SafeQL ESLint plugin not yet installed (project created on Windows machine), installing...', - ); - await executeCommand('pnpm add @ts-safeql/eslint-plugin libpg-query', { - cwd: projectPath, - }); - - // Commit packages.json and pnpm-lock.yaml changes to - // avoid failing "All changes committed to Git" check - await executeCommand( - 'git config user.email github-actions[bot]@users.noreply.github.com', - { cwd: projectPath }, - ); - await executeCommand('git config user.name github-actions[bot]', { - cwd: projectPath, - }); - await executeCommand( - 'git commit --all --message Add\\ SafeSQL\\ for\\ Windows', - { cwd: projectPath }, - ); - } } console.log('Running Preflight...');