Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 315820d487 | |||
| 878fd1c766 |
@@ -17,6 +17,13 @@ jobs:
|
|||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: https://github.com/actions/checkout@v4
|
uses: https://github.com/actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Restore npm cache
|
||||||
|
uses: https://github.com/actions/cache@v4
|
||||||
|
with:
|
||||||
|
path: ~/AppData/Local/npm-cache
|
||||||
|
key: npm-windows-${{ hashFiles('package-lock.json', 'website/package-lock.json') }}
|
||||||
|
restore-keys: npm-windows-
|
||||||
|
|
||||||
- name: Install root dependencies
|
- name: Install root dependencies
|
||||||
env:
|
env:
|
||||||
NODE_ENV: development
|
NODE_ENV: development
|
||||||
|
|||||||
@@ -48,18 +48,30 @@ jobs:
|
|||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: https://github.com/actions/checkout@v4
|
uses: https://github.com/actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Restore npm cache
|
||||||
|
uses: https://github.com/actions/cache@v4
|
||||||
|
with:
|
||||||
|
path: /root/.npm
|
||||||
|
key: npm-linux-${{ hashFiles('package-lock.json', 'server/package-lock.json') }}
|
||||||
|
restore-keys: npm-linux-
|
||||||
|
|
||||||
|
- name: Restore Electron cache
|
||||||
|
uses: https://github.com/actions/cache@v4
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
/root/.cache/electron
|
||||||
|
/root/.cache/electron-builder
|
||||||
|
key: electron-linux-${{ hashFiles('package.json') }}
|
||||||
|
restore-keys: electron-linux-
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
env:
|
env:
|
||||||
NODE_ENV: development
|
NODE_ENV: development
|
||||||
run: |
|
run: |
|
||||||
|
apt-get update && apt-get install -y --no-install-recommends zip
|
||||||
npm ci
|
npm ci
|
||||||
cd server && npm ci
|
cd server && npm ci
|
||||||
|
|
||||||
- name: Install zip utility
|
|
||||||
run: |
|
|
||||||
apt-get update
|
|
||||||
apt-get install -y zip
|
|
||||||
|
|
||||||
- name: Set CI release version
|
- name: Set CI release version
|
||||||
run: >
|
run: >
|
||||||
node tools/set-release-version.js
|
node tools/set-release-version.js
|
||||||
@@ -108,6 +120,22 @@ jobs:
|
|||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: https://github.com/actions/checkout@v4
|
uses: https://github.com/actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Restore npm cache
|
||||||
|
uses: https://github.com/actions/cache@v4
|
||||||
|
with:
|
||||||
|
path: ~/AppData/Local/npm-cache
|
||||||
|
key: npm-windows-${{ hashFiles('package-lock.json', 'server/package-lock.json') }}
|
||||||
|
restore-keys: npm-windows-
|
||||||
|
|
||||||
|
- name: Restore Electron cache
|
||||||
|
uses: https://github.com/actions/cache@v4
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
~/AppData/Local/electron/Cache
|
||||||
|
~/AppData/Local/electron-builder/Cache
|
||||||
|
key: electron-windows-${{ hashFiles('package.json') }}
|
||||||
|
restore-keys: electron-windows-
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
env:
|
env:
|
||||||
NODE_ENV: development
|
NODE_ENV: development
|
||||||
@@ -217,9 +245,6 @@ jobs:
|
|||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: https://github.com/actions/checkout@v4
|
uses: https://github.com/actions/checkout@v4
|
||||||
|
|
||||||
- name: Install dependencies
|
|
||||||
run: npm ci --omit=dev
|
|
||||||
|
|
||||||
- name: Download previous manifest
|
- name: Download previous manifest
|
||||||
env:
|
env:
|
||||||
GITEA_RELEASE_TOKEN: ${{ secrets.RELEASE_TOKEN }}
|
GITEA_RELEASE_TOKEN: ${{ secrets.RELEASE_TOKEN }}
|
||||||
|
|||||||
@@ -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