Skip to content

Commit 1bac49c

Browse files
committed
fix: use dash as separate in package version
The Linux package build was using a dot to separate the "release base" and the "patch" values when updating the "version" property in the package.json file. This could result in a version like "2020.1.1.9999999" which is not a valid Node.js package version, and would result in errors when invoking the npm command. Note that this does not stop pm2 from running the service, but it would prevent an admin from running npm commands on the service. Instead of a dot, the build process now uses a dash as the separator, since that is okay for Node.js package versions (e.g. "2020.1.1-999999" is okay).
1 parent 493155a commit 1bac49c

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

build/rpm/helix-auth-svc.spec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ cp -pr views/* %{buildroot}%{installprefix}/views
5555
cp ecosystem.config.js %{buildroot}%{installprefix}/ecosystem.config.js
5656
cp logging.config.js %{buildroot}%{installprefix}/logging.config.js
5757
cp package-lock.json %{buildroot}%{installprefix}/package-lock.json
58-
sed -e "s/\"2020.1.1\"/\"${ID_REL_BASE}.${ID_PATCH}\"/" \
58+
sed -e "s/\"2020.1.1\"/\"${ID_REL_BASE}-${ID_PATCH}\"/" \
5959
-e "s|+MAIN+|%{hasversion}|" \
6060
package.json > %{buildroot}%{installprefix}/package.json
6161
cp README.md %{buildroot}%{installprefix}/README.md

build/ubuntu16/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ COPY ecosystem.config.js ecosystem.config.js
4444
COPY logging.config.js logging.config.js
4545
COPY package-lock.json package-lock.json
4646
COPY package.json package.json.in
47-
RUN sed -e "s/\"2020.1.1\"/\"${ID_REL_BASE}.${ID_PATCH}\"/" \
47+
RUN sed -e "s/\"2020.1.1\"/\"${ID_REL_BASE}-${ID_PATCH}\"/" \
4848
-e "s|+MAIN+|${HAS_VERSION}|" package.json.in > package.json && \
4949
rm -f package.json.in
5050
COPY README.md README.md

build/ubuntu18/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ COPY ecosystem.config.js ecosystem.config.js
4444
COPY logging.config.js logging.config.js
4545
COPY package-lock.json package-lock.json
4646
COPY package.json package.json.in
47-
RUN sed -e "s/\"2020.1.1\"/\"${ID_REL_BASE}.${ID_PATCH}\"/" \
47+
RUN sed -e "s/\"2020.1.1\"/\"${ID_REL_BASE}-${ID_PATCH}\"/" \
4848
-e "s|+MAIN+|${HAS_VERSION}|" package.json.in > package.json && \
4949
rm -f package.json.in
5050
COPY README.md README.md

build/ubuntu20/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ COPY ecosystem.config.js ecosystem.config.js
4444
COPY logging.config.js logging.config.js
4545
COPY package-lock.json package-lock.json
4646
COPY package.json package.json.in
47-
RUN sed -e "s/\"2020.1.1\"/\"${ID_REL_BASE}.${ID_PATCH}\"/" \
47+
RUN sed -e "s/\"2020.1.1\"/\"${ID_REL_BASE}-${ID_PATCH}\"/" \
4848
-e "s|+MAIN+|${HAS_VERSION}|" package.json.in > package.json && \
4949
rm -f package.json.in
5050
COPY README.md README.md

0 commit comments

Comments
 (0)