-
-
Notifications
You must be signed in to change notification settings - Fork 86
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
Showing
1 changed file
with
4 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,6 +12,10 @@ RUN apt-get update && apt-get install -y git bsdmainutils vim-common | |
WORKDIR /app | ||
COPY . . | ||
|
||
# Run a command to replace all dependencies and devDependencies with workspace:* in current package.json | ||
# with the version number found in the package.json.version: | ||
RUN node -e "let pkg=require('./package.json'); ['dependencies', 'devDependencies'].forEach(depType => { if(pkg[depType]) { Object.keys(pkg[depType]).forEach(dep => { if(pkg[depType][dep].startsWith('workspace:')) { pkg[depType][dep] = pkg.version; } }); } }); require('fs').writeFileSync('./package.json', JSON.stringify(pkg, null, 2));" | ||
|
||
RUN corepack enable | ||
RUN corepack prepare [email protected] --activate | ||
RUN yarn install | ||
|