From 928b08067716350fd58963154e2818c5a0e83ca8 Mon Sep 17 00:00:00 2001 From: mikiher Date: Sat, 6 Jul 2024 19:43:55 +0300 Subject: [PATCH] Replace pkg with @yao-pkg/pkg and target node20 --- .github/workflows/integration-test.yml | 8 ++++---- build/linuxpackager | 2 +- package.json | 2 +- server/Server.js | 1 + 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/integration-test.yml b/.github/workflows/integration-test.yml index df639ef7..3e499468 100644 --- a/.github/workflows/integration-test.yml +++ b/.github/workflows/integration-test.yml @@ -4,7 +4,7 @@ on: pull_request: push: branches-ignore: - - 'dependabot/**' # Don't run dependabot branches, as they are already covered by pull requests + - 'dependabot/**' # Don't run dependabot branches, as they are already covered by pull requests jobs: build: @@ -18,8 +18,8 @@ jobs: with: node-version: 20 - - name: install pkg - run: npm install -g pkg + - name: install pkg (using yao-pkg fork for targetting node20) + run: npm install -g @yao-pkg/pkg - name: get client dependencies working-directory: client @@ -33,7 +33,7 @@ jobs: run: npm ci --only=production - name: build binary - run: pkg -t node18-linux-x64 -o audiobookshelf . + run: pkg -t node20-linux-x64 -o audiobookshelf . - name: run audiobookshelf run: | diff --git a/build/linuxpackager b/build/linuxpackager index 5f03a2e8..52a9beba 100755 --- a/build/linuxpackager +++ b/build/linuxpackager @@ -48,7 +48,7 @@ Description: $DESCRIPTION" echo "$controlfile" > dist/debian/DEBIAN/control; # Package debian -pkg -t node18-linux-x64 -o dist/debian/usr/share/audiobookshelf/audiobookshelf . +pkg -t node20-linux-x64 -o dist/debian/usr/share/audiobookshelf/audiobookshelf . fakeroot dpkg-deb -Zxz --build dist/debian diff --git a/package.json b/package.json index 7914c90d..1212bd7e 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ "start": "node index.js", "client": "cd client && npm ci && npm run generate", "prod": "npm run client && npm ci && node prod.js", - "build-win": "npm run client && pkg -t node18-win-x64 -o ./dist/win/audiobookshelf -C GZip .", + "build-win": "npm run client && pkg -t node20-win-x64 -o ./dist/win/audiobookshelf -C GZip .", "build-linux": "build/linuxpackager", "docker": "docker buildx build --platform linux/amd64,linux/arm64 --push . -t advplyr/audiobookshelf", "docker-amd64-local": "docker buildx build --platform linux/amd64 --load . -t advplyr/audiobookshelf-amd64-local", diff --git a/server/Server.js b/server/Server.js index 9b164291..76d8466d 100644 --- a/server/Server.js +++ b/server/Server.js @@ -104,6 +104,7 @@ class Server { */ async init() { Logger.info('[Server] Init v' + version) + Logger.info('[Server] Node.js Version:', process.version) await this.playbackSessionManager.removeOrphanStreams()