ci: attempt to fix
All checks were successful
Queue Release Build / prepare (push) Successful in 16s
Deploy Web Apps / deploy (push) Successful in 11m21s
Queue Release Build / build-linux (push) Successful in 25m31s
Queue Release Build / build-windows (push) Successful in 21m42s
Queue Release Build / finalize (push) Successful in 22s
All checks were successful
Queue Release Build / prepare (push) Successful in 16s
Deploy Web Apps / deploy (push) Successful in 11m21s
Queue Release Build / build-linux (push) Successful in 25m31s
Queue Release Build / build-windows (push) Successful in 21m42s
Queue Release Build / finalize (push) Successful in 22s
This commit is contained in:
@@ -164,6 +164,8 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
$projectRoot = $PWD.ProviderPath
|
$projectRoot = $PWD.ProviderPath
|
||||||
$electronBuilderWorkspace = Join-Path $env:TEMP ([guid]::NewGuid().ToString('N'))
|
$electronBuilderWorkspace = Join-Path $env:TEMP ([guid]::NewGuid().ToString('N'))
|
||||||
|
$electronBuilderCache = Join-Path $electronBuilderWorkspace 'electron-builder-cache'
|
||||||
|
$electronCache = Join-Path $electronBuilderWorkspace 'electron-cache'
|
||||||
$locationPushed = $false
|
$locationPushed = $false
|
||||||
|
|
||||||
function Invoke-RoboCopy {
|
function Invoke-RoboCopy {
|
||||||
@@ -183,27 +185,21 @@ jobs:
|
|||||||
# electron-builder rejects junction-backed files during asar creation
|
# electron-builder rejects junction-backed files during asar creation
|
||||||
# because their resolved path sits outside the package root.
|
# because their resolved path sits outside the package root.
|
||||||
New-Item -ItemType Directory -Path $electronBuilderWorkspace | Out-Null
|
New-Item -ItemType Directory -Path $electronBuilderWorkspace | Out-Null
|
||||||
|
New-Item -ItemType Directory -Path $electronBuilderCache | Out-Null
|
||||||
# Point electron-builder at the Electron binary already present
|
New-Item -ItemType Directory -Path $electronCache | Out-Null
|
||||||
# in the main workspace so the packaging workspace can skip it.
|
$env:ELECTRON_BUILDER_CACHE = $electronBuilderCache
|
||||||
$env:ELECTRON_OVERRIDE_DIST_PATH = Join-Path $projectRoot 'node_modules\electron\dist'
|
$env:ELECTRON_CACHE = $electronCache
|
||||||
|
|
||||||
try {
|
try {
|
||||||
Copy-Item -Path (Join-Path $projectRoot 'package.json') -Destination (Join-Path $electronBuilderWorkspace 'package.json') -Force
|
Copy-Item -Path (Join-Path $projectRoot 'package.json') -Destination (Join-Path $electronBuilderWorkspace 'package.json') -Force
|
||||||
Copy-Item -Path (Join-Path $projectRoot 'package-lock.json') -Destination (Join-Path $electronBuilderWorkspace 'package-lock.json') -Force
|
Copy-Item -Path (Join-Path $projectRoot 'package-lock.json') -Destination (Join-Path $electronBuilderWorkspace 'package-lock.json') -Force
|
||||||
Invoke-RoboCopy (Join-Path $projectRoot 'dist') (Join-Path $electronBuilderWorkspace 'dist')
|
Invoke-RoboCopy (Join-Path $projectRoot 'dist') (Join-Path $electronBuilderWorkspace 'dist')
|
||||||
Invoke-RoboCopy (Join-Path $projectRoot 'images') (Join-Path $electronBuilderWorkspace 'images')
|
Invoke-RoboCopy (Join-Path $projectRoot 'images') (Join-Path $electronBuilderWorkspace 'images')
|
||||||
|
Invoke-RoboCopy (Join-Path $projectRoot 'node_modules') (Join-Path $electronBuilderWorkspace 'node_modules')
|
||||||
|
|
||||||
Push-Location $electronBuilderWorkspace
|
Push-Location $electronBuilderWorkspace
|
||||||
$locationPushed = $true
|
$locationPushed = $true
|
||||||
|
npx electron-builder --win --publish never
|
||||||
# Install only production dependencies — much faster than
|
|
||||||
# mirroring the full node_modules tree via robocopy and also
|
|
||||||
# avoids the junction/symlink issues that require the temp workspace.
|
|
||||||
npm ci --omit=dev --ignore-scripts
|
|
||||||
|
|
||||||
$electronBuilderBin = Join-Path $projectRoot 'node_modules\.bin\electron-builder.cmd'
|
|
||||||
& $electronBuilderBin --win --publish never
|
|
||||||
if ($LASTEXITCODE -ne 0) {
|
if ($LASTEXITCODE -ne 0) {
|
||||||
throw "electron-builder failed with exit code $LASTEXITCODE"
|
throw "electron-builder failed with exit code $LASTEXITCODE"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -146,9 +146,13 @@
|
|||||||
"output": "dist-electron"
|
"output": "dist-electron"
|
||||||
},
|
},
|
||||||
"files": [
|
"files": [
|
||||||
|
"!node_modules",
|
||||||
"dist/client/**/*",
|
"dist/client/**/*",
|
||||||
"dist/electron/**/*",
|
"dist/electron/**/*",
|
||||||
"node_modules/**/*",
|
"node_modules/{ansi-regex,ansi-styles,ansis,app-root-path,applescript,argparse,auto-launch,available-typed-arrays,balanced-match,base64-js,brace-expansion,buffer,builder-util-runtime,call-bind,call-bind-apply-helpers,call-bound,cliui,concat-map,cross-spawn,dayjs,debug,dedent,define-data-property,dotenv,dunder-proto,electron-updater,emoji-regex,es-define-property,es-errors,es-object-atoms,escalade,for-each,foreground-child,fs-extra,function-bind,get-caller-file,get-east-asian-width,get-intrinsic,get-proto,glob,gopd,graceful-fs,has-property-descriptors,has-symbols,has-tostringtag,hasown,ieee754,inherits,is-callable,is-fullwidth-code-point,is-typed-array,isarray,isexe,jackspeak,js-yaml,jsonfile,lazy-val,lodash.escaperegexp,lodash.isequal,lru-cache,math-intrinsics,minimatch,minimist,minipass,mkdirp,ms,package-json-from-dist,path-is-absolute,path-key,path-scurry,possible-typed-array-names,reflect-metadata,safe-buffer,sax,semver,set-function-length,sha.js,shebang-command,shebang-regex,signal-exit,sql-highlight,sql.js,string-width,string-width-cjs,strip-ansi,strip-ansi-cjs,tiny-typed-emitter,to-buffer,tslib,typed-array-buffer,typeorm,universalify,untildify,uuid,which,which-typed-array,winreg,wrap-ansi,wrap-ansi-cjs,y18n,yallist,yargs,yargs-parser}/**/*",
|
||||||
|
"node_modules/@isaacs/cliui/**/*",
|
||||||
|
"node_modules/@pkgjs/parseargs/**/*",
|
||||||
|
"node_modules/@sqltools/formatter/**/*",
|
||||||
"!node_modules/**/test/**/*",
|
"!node_modules/**/test/**/*",
|
||||||
"!node_modules/**/tests/**/*",
|
"!node_modules/**/tests/**/*",
|
||||||
"!node_modules/**/*.d.ts",
|
"!node_modules/**/*.d.ts",
|
||||||
|
|||||||
@@ -4,8 +4,12 @@ export class ServerChannels1000000000002 implements MigrationInterface {
|
|||||||
name = 'ServerChannels1000000000002';
|
name = 'ServerChannels1000000000002';
|
||||||
|
|
||||||
public async up(queryRunner: QueryRunner): Promise<void> {
|
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||||
|
const columns: { name: string }[] = await queryRunner.query(`PRAGMA table_info("servers")`);
|
||||||
|
const hasChannels = columns.some(c => c.name === 'channels');
|
||||||
|
if (!hasChannels) {
|
||||||
await queryRunner.query(`ALTER TABLE "servers" ADD COLUMN "channels" TEXT NOT NULL DEFAULT '[]'`);
|
await queryRunner.query(`ALTER TABLE "servers" ADD COLUMN "channels" TEXT NOT NULL DEFAULT '[]'`);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public async down(queryRunner: QueryRunner): Promise<void> {
|
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||||
await queryRunner.query(`ALTER TABLE "servers" DROP COLUMN "channels"`);
|
await queryRunner.query(`ALTER TABLE "servers" DROP COLUMN "channels"`);
|
||||||
|
|||||||
Reference in New Issue
Block a user