未验证 提交 a730bec6 编写于 作者: A Anmol Sethi 提交者: GitHub

Ship with node 12 (#1998)

See #1894
See #1892
See #1810
上级 ce2eaf2f
FROM centos:7 FROM centos:7
ARG NODE_VERSION=v12.18.3
RUN ARCH="$(uname -m | sed 's/86_64/64/; s/aarch64/arm64/')" && \ RUN ARCH="$(uname -m | sed 's/86_64/64/; s/aarch64/arm64/')" && \
curl -fsSL "https://nodejs.org/dist/v14.4.0/node-v14.4.0-linux-$ARCH.tar.xz" | tar -C /usr/local -xJ && \ curl -fsSL "https://nodejs.org/dist/$NODE_VERSION/node-$NODE_VERSION-linux-$ARCH.tar.xz" | tar -C /usr/local -xJ && \
mv /usr/local/node-v14.4.0-linux-$ARCH /usr/local/node-v14.4.0 mv "/usr/local/node-$NODE_VERSION-linux-$ARCH" "/usr/local/node-$NODE_VERSION"
ENV PATH=/usr/local/node-v14.4.0/bin:$PATH ENV PATH=/usr/local/node-$NODE_VERSION/bin:$PATH
RUN npm install -g yarn RUN npm install -g yarn
RUN yum groupinstall -y 'Development Tools' RUN yum groupinstall -y 'Development Tools'
......
...@@ -6,7 +6,7 @@ RUN apt-get update ...@@ -6,7 +6,7 @@ RUN apt-get update
RUN apt-get install -y curl gnupg RUN apt-get install -y curl gnupg
# Installs node. # Installs node.
RUN curl -fsSL https://deb.nodesource.com/setup_14.x | bash - && \ RUN curl -fsSL https://deb.nodesource.com/setup_12.x | bash - && \
apt-get install -y nodejs apt-get install -y nodejs
# Installs yarn. # Installs yarn.
......
...@@ -5,8 +5,9 @@ main() { ...@@ -5,8 +5,9 @@ main() {
cd "$(dirname "$0")/../.." cd "$(dirname "$0")/../.."
if [[ $OSTYPE == darwin* ]]; then if [[ $OSTYPE == darwin* ]]; then
curl -L https://nodejs.org/dist/v14.4.0/node-v14.4.0-darwin-x64.tar.gz | tar -xz NODE_VERSION=v12.18.3
PATH="$PWD/node-v14.4.0-darwin-x64/bin:$PATH" curl -L "https://nodejs.org/dist/$NODE_VERSION/node-$NODE_VERSION-darwin-x64.tar.gz" | tar -xz
PATH="$PWD/node-$NODE_VERSION-darwin-x64/bin:$PATH"
fi fi
# https://github.com/actions/upload-artifact/issues/38 # https://github.com/actions/upload-artifact/issues/38
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册