Skip to content

Commit

Permalink
fix: use yarn link instead of yalc in Dockerfile.contrib (#181)
Browse files Browse the repository at this point in the history
* fix: use yarn link instead of yalc

* fix: @zwave-js/core should not need to be linked I think

* fix: link all packages
  • Loading branch information
AlCalzone authored Jan 10, 2021
1 parent 04952ea commit 107471b
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions docker/Dockerfile.contrib
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ COPY --chown=node zwavejs2mqtt /home/node/zwavejs2mqtt
FROM ${SRC} AS build
ARG YARN_NETWORK_TIMEOUT=30000
USER root
RUN yarn global add yalc
RUN apt-get update && apt-get install -y jq
USER node
WORKDIR /home/node/node-zwave-js
Expand All @@ -30,26 +29,21 @@ RUN for i in config core serial shared; do \
cd packages/$i && \
yarn version --no-git-tag-version --new-version $(yarn versions --json| \
jq -r '[.data."@zwave-js/'${i}'"]'[0])-$(git rev-parse --short HEAD) && \
yalc publish && \
yarn link && \
cd ../..; \
done
RUN cd packages/zwave-js && \
yarn version --no-git-tag-version --new-version $(yarn versions --json| \
jq -r '[.data."zwave-js"]'[0])-$(git rev-parse --short HEAD) && \
yalc publish
yarn link

WORKDIR /home/node/zwavejs2mqtt
RUN rm -f package-lock.json
RUN yalc add zwave-js && \
yalc add @zwave-js/config && \
yalc add @zwave-js/core && \
yalc add @zwave-js/shared && \
yalc add @zwave-js/serial
RUN yarn install --network-timeout=${YARN_NETWORK_TIMEOUT}
RUN yarn run build
RUN yarn install --production --frozen-lockfile
RUN yarn version -s --no-git-tag-version --new-version $(yarn versions --json| \
jq -r .data.zwavejs2mqtt)+$(git rev-parse --short HEAD)
RUN yarn link zwave-js @zwave-js/core @zwave-js/config @zwave-js/serial @zwave-js/shared

RUN mkdir my_dist
RUN cp -Lr .git app.js package.json bin config dist hass lib public store views node_modules my_dist/
Expand Down

0 comments on commit 107471b

Please sign in to comment.