Skip to content
This repository was archived by the owner on Dec 14, 2023. It is now read-only.

Commit 11f8e1a

Browse files
butlerxDanielBrierton
authored andcommitted
check if the package file has changed rather then if a node muodules exists
1 parent bfaf3cf commit 11f8e1a

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,4 @@ web/locale/*
3535
!web/locale/en_US
3636
email-templates/*
3737
!email-templates/*-en_US
38+
.pkg.sha1

docker-entrypoint.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
#! /usr/bin/env sh
2+
set -e
23
cd /usr/src/app || exit
3-
if [ ! -d "node_modules" ]; then
4+
touch .pkg.sha1
5+
OLD_SHA=$(cat .pkg.sha1)
6+
NEW_SHA=$(sha1sum package.json)
7+
if [ "$OLD_SHA" != "$NEW_SHA" ]; then
8+
echo "$NEW_SHA" > .pkg.sha1
49
npm install
510
rm -rf node_modules/cp-translations
611
ln -s /usr/src/cp-translations node_modules/cp-translations

0 commit comments

Comments
 (0)