PromucFlow_constructor/app/rts/build.sh
Arpit Mohan 7580eb9990
ci: Fixing the RTS build workflow (#16748)
## Description

The problem with the RTS workflow after the induction of AST parsing was that while copying the `node_modules`, Ubuntu doesn't follow the symlink and copy the content. It simply copies the symlink as is. This causes issues for RTS service to start.

## Type of change

- Bug fix (non-breaking change which fixes an issue)

## How Has This Been Tested?

- Personal repository

## Checklist:

- [ ] My code follows the style guidelines of this project
- [ ] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [ ] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my feature works
- [ ] New and existing unit tests pass locally with my changes
2022-09-14 14:24:20 +05:30

12 lines
542 B
Bash
Executable File

#!/usr/bin/env bash
set -o errexit
cd "$(dirname "$0")"
yarn install --frozen-lockfile
npx tsc && npx tsc-alias
# Copying node_modules directory into dist as rts server requires node_modules to run server build properly.
# This was previously being done in dockerfile which was copying the symlinks to image rather than the whole directory of shared modules (e.g. AST)
# Also, we copy node_modules with -L flag in order to follow the symlinks for @shared folder and copy the contents instead of just the symlink
cp -rL node_modules ./dist