forked from CringeStudios/element-desktop
Specify node version to avoid NAPI keytar bug (#2168)
This commit is contained in:
parent
a546b28c62
commit
a46985d91e
2
.github/workflows/build_and_test.yaml
vendored
2
.github/workflows/build_and_test.yaml
vendored
@ -97,7 +97,7 @@ jobs:
|
|||||||
|
|
||||||
- uses: actions/setup-node@v4
|
- uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version-file: package.json
|
node-version-file: .node-version
|
||||||
cache: "yarn"
|
cache: "yarn"
|
||||||
|
|
||||||
- name: Install Deps
|
- name: Install Deps
|
||||||
|
4
.github/workflows/build_linux.yaml
vendored
4
.github/workflows/build_linux.yaml
vendored
@ -76,7 +76,7 @@ jobs:
|
|||||||
|
|
||||||
- uses: actions/setup-node@v4
|
- uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version-file: package.json
|
node-version-file: .node-version
|
||||||
cache: "yarn"
|
cache: "yarn"
|
||||||
env:
|
env:
|
||||||
# Workaround for https://github.com/actions/setup-node/issues/317
|
# Workaround for https://github.com/actions/setup-node/issues/317
|
||||||
@ -98,7 +98,7 @@ jobs:
|
|||||||
uses: docker/build-push-action@ca877d9245402d1537745e0e356eab47c3520991 # v6
|
uses: docker/build-push-action@ca877d9245402d1537745e0e356eab47c3520991 # v6
|
||||||
if: steps.changed_files.outputs.any_modified == 'true'
|
if: steps.changed_files.outputs.any_modified == 'true'
|
||||||
with:
|
with:
|
||||||
context: dockerbuild
|
file: dockerbuild/Dockerfile
|
||||||
load: true
|
load: true
|
||||||
platforms: linux/${{ inputs.arch }}
|
platforms: linux/${{ inputs.arch }}
|
||||||
tags: ${{ env.HAK_DOCKER_IMAGE }}
|
tags: ${{ env.HAK_DOCKER_IMAGE }}
|
||||||
|
2
.github/workflows/build_macos.yaml
vendored
2
.github/workflows/build_macos.yaml
vendored
@ -62,7 +62,7 @@ jobs:
|
|||||||
|
|
||||||
- uses: actions/setup-node@v4
|
- uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version-file: package.json
|
node-version-file: .node-version
|
||||||
cache: "yarn"
|
cache: "yarn"
|
||||||
|
|
||||||
- name: Install Deps
|
- name: Install Deps
|
||||||
|
2
.github/workflows/build_prepare.yaml
vendored
2
.github/workflows/build_prepare.yaml
vendored
@ -56,7 +56,7 @@ jobs:
|
|||||||
|
|
||||||
- uses: actions/setup-node@v4
|
- uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version-file: package.json
|
node-version-file: .node-version
|
||||||
cache: "yarn"
|
cache: "yarn"
|
||||||
|
|
||||||
- name: Install Deps
|
- name: Install Deps
|
||||||
|
4
.github/workflows/build_windows.yaml
vendored
4
.github/workflows/build_windows.yaml
vendored
@ -99,9 +99,7 @@ jobs:
|
|||||||
|
|
||||||
- uses: actions/setup-node@v4
|
- uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
# node-version-file: package.json
|
node-version-file: .node-version
|
||||||
# For https://github.com/element-hq/element-desktop/issues/2161
|
|
||||||
node-version: 22.13.1
|
|
||||||
cache: "yarn"
|
cache: "yarn"
|
||||||
|
|
||||||
- name: Install Deps
|
- name: Install Deps
|
||||||
|
4
.github/workflows/dockerbuild.yaml
vendored
4
.github/workflows/dockerbuild.yaml
vendored
@ -32,7 +32,7 @@ jobs:
|
|||||||
- name: Build test image
|
- name: Build test image
|
||||||
uses: docker/build-push-action@ca877d9245402d1537745e0e356eab47c3520991 # v6
|
uses: docker/build-push-action@ca877d9245402d1537745e0e356eab47c3520991 # v6
|
||||||
with:
|
with:
|
||||||
context: dockerbuild
|
file: dockerbuild/Dockerfile
|
||||||
push: false
|
push: false
|
||||||
load: true
|
load: true
|
||||||
tags: element-desktop-dockerbuild
|
tags: element-desktop-dockerbuild
|
||||||
@ -63,7 +63,7 @@ jobs:
|
|||||||
if: github.event_name != 'pull_request'
|
if: github.event_name != 'pull_request'
|
||||||
uses: docker/build-push-action@ca877d9245402d1537745e0e356eab47c3520991 # v6
|
uses: docker/build-push-action@ca877d9245402d1537745e0e356eab47c3520991 # v6
|
||||||
with:
|
with:
|
||||||
context: dockerbuild
|
file: dockerbuild/Dockerfile
|
||||||
push: true
|
push: true
|
||||||
tags: ${{ steps.meta.outputs.tags }}
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
labels: ${{ steps.meta.outputs.labels }}
|
labels: ${{ steps.meta.outputs.labels }}
|
||||||
|
1
.node-version
Normal file
1
.node-version
Normal file
@ -0,0 +1 @@
|
|||||||
|
v22.13.1
|
@ -21,8 +21,7 @@ ENV FORCE_COLOR true
|
|||||||
|
|
||||||
WORKDIR /project
|
WORKDIR /project
|
||||||
|
|
||||||
ENV NODE_VERSION 20.18.2
|
|
||||||
ARG TARGETOS
|
ARG TARGETOS
|
||||||
ARG TARGETARCH
|
ARG TARGETARCH
|
||||||
COPY setup.sh /setup.sh
|
COPY .node-version dockerbuild/setup.sh /
|
||||||
RUN /setup.sh
|
RUN /setup.sh
|
||||||
|
@ -3,5 +3,6 @@
|
|||||||
set -x
|
set -x
|
||||||
declare -A archMap=(["amd64"]="x64" ["arm64"]="arm64")
|
declare -A archMap=(["amd64"]="x64" ["arm64"]="arm64")
|
||||||
ARCH="${archMap["$TARGETARCH"]}"
|
ARCH="${archMap["$TARGETARCH"]}"
|
||||||
curl --proto "=https" -L "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-$TARGETOS-$ARCH.tar.gz" | tar xz -C /usr/local --strip-components=1 && \
|
NODE_VERSION=$(cat /.node-version)
|
||||||
|
curl --proto "=https" -L "https://nodejs.org/dist/$NODE_VERSION/node-$NODE_VERSION-$TARGETOS-$ARCH.tar.gz" | tar xz -C /usr/local --strip-components=1 && \
|
||||||
unlink /usr/local/CHANGELOG.md && unlink /usr/local/LICENSE && unlink /usr/local/README.md
|
unlink /usr/local/CHANGELOG.md && unlink /usr/local/LICENSE && unlink /usr/local/README.md
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
"type": "module",
|
"type": "module",
|
||||||
"files": [],
|
"files": [],
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=18.0.0"
|
"node": ">=18.0.0 <=22.13.1 || >22"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"i18n": "matrix-gen-i18n && yarn i18n:sort && yarn i18n:lint",
|
"i18n": "matrix-gen-i18n && yarn i18n:sort && yarn i18n:lint",
|
||||||
@ -44,7 +44,7 @@
|
|||||||
"build": "yarn run build:ts && yarn run build:res && electron-builder",
|
"build": "yarn run build:ts && yarn run build:res && electron-builder",
|
||||||
"build:ts": "tsc",
|
"build:ts": "tsc",
|
||||||
"build:res": "tsx scripts/copy-res.ts",
|
"build:res": "tsx scripts/copy-res.ts",
|
||||||
"docker:setup": "docker build --platform linux/amd64 -t element-desktop-dockerbuild dockerbuild",
|
"docker:setup": "docker build --platform linux/amd64 -t element-desktop-dockerbuild -f dockerbuild/Dockerfile .",
|
||||||
"docker:build:native": "scripts/in-docker.sh yarn run hak",
|
"docker:build:native": "scripts/in-docker.sh yarn run hak",
|
||||||
"docker:build": "scripts/in-docker.sh yarn run build",
|
"docker:build": "scripts/in-docker.sh yarn run build",
|
||||||
"docker:install": "scripts/in-docker.sh yarn install",
|
"docker:install": "scripts/in-docker.sh yarn install",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user