-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
beadd7a
commit 362b154
Showing
3 changed files
with
43 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
while true; do | ||
# Check if the current and previous package-lock.json are the same | ||
if ( [ -f /var/tmp/authx-init/installer-complete ] && cmp -s ./package-lock.json /var/tmp/authx-init/installer-complete ); then | ||
if ( [ -f /tmp/package-lock.json ] && cmp -s ./package-lock.json /tmp/package-lock.json ); then | ||
echo "No changes detected in package-lock.json; sleeping..." | ||
sleep 10 | ||
continue | ||
fi | ||
|
||
# Install dependencies and copy the new package-lock.json | ||
echo "Changes detected in package-lock.json; installing packages..." | ||
rm -f /var/tmp/authx-init/installer-complete | ||
npm ci && cp package-lock.json /var/tmp/authx-init/installer-complete | ||
rm -f /tmp/package-lock.json | ||
npm install --package-lock-only && cp package-lock.json /tmp/package-lock.json | ||
sleep 10 | ||
done |