Skip to content
This repository has been archived by the owner on Jun 6, 2024. It is now read-only.

Commit

Permalink
[Hotfix] Move npm version to dockerfile #3109 (#3110)
Browse files Browse the repository at this point in the history
* Move npm version to dockerfile

Move npm version to dockerfile in rest server and webportal.

Fixes #3035, #3100.

* Use yarn version

Use `yarn version`.
  • Loading branch information
abuccts authored and debuggy committed Jul 19, 2019
1 parent 1c329b8 commit de797d4
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 3 deletions.
3 changes: 3 additions & 0 deletions src/rest-server/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# PAI Version directory
version/

# Directory for submitted jobs' json file and scripts
frameworklauncher/

Expand Down
2 changes: 1 addition & 1 deletion src/rest-server/build/build-pre.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@

pushd $(dirname "$0") > /dev/null

npm --no-git-tag-version version $(cat ../../../version/PAI.VERSION)
cp -arf "../../../version" "../version"

popd > /dev/null
2 changes: 2 additions & 0 deletions src/rest-server/build/rest-server.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ ENV NODE_ENV=production \

COPY . .

RUN yarn --no-git-tag-version --new-version version \
"$(cat version/PAI.VERSION)"
RUN yarn install

RUN dos2unix src/templates/*
Expand Down
3 changes: 3 additions & 0 deletions src/webportal/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# PAI Version directory
version/

*.zip
job-docs.md
job-submit.example.json
Expand Down
3 changes: 1 addition & 2 deletions src/webportal/build/build-pre.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ pushd $(dirname "$0") > /dev/null

mkdir -p "../dependency"
cp -arf "../../../docs" "../../../examples" "../dependency"

npm --no-git-tag-version version $(cat ../../../version/PAI.VERSION)
cp -arf "../../../version" "../version"

popd > /dev/null
2 changes: 2 additions & 0 deletions src/webportal/build/webportal.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ ENV NODE_ENV=production \
COPY dependency/ ../../
COPY . .

RUN yarn --no-git-tag-version --new-version version \
"$(cat version/PAI.VERSION)"
RUN yarn install
RUN npm run build

Expand Down

0 comments on commit de797d4

Please sign in to comment.