Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 60 additions & 0 deletions install.bash
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
#!/usr/bin/env bash

set -e

yarn install --frozen-lockfile

for dir in packages/*; do
echo "Installing... $dir"
pushd "$dir"
yarn install --frozen-lockfile
popd
echo "Done..."
echo ""
done

for dir in platform/*; do
echo "Installing... $dir"
pushd "$dir"
yarn install --frozen-lockfile
if [ -d "internal_pkgs" ]; then
for subdir in internal_pkgs/*; do
pushd "$subdir"
yarn install --frozen-lockfile
if [ "$(jq -r '.scripts.build' package.json)" != "null" ]; then
NODE_ENV=production yarn build
fi
popd
done
fi
popd
echo "Done..."
echo ""
done

NX_REJECT_UNKNOWN_LOCAL_CACHE=0 yarn nx run-many --target=build --verbose

for dir in platform/*; do
if [ "$dir" == "platform/wab" ]; then
continue
fi
echo "Building... $dir"
pushd platform/"$dir"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I got an error at this line:

Building... platform/canvas-packages
./install.bash: line 42: pushd: platform/platform/canvas-packages: No such file or directory

Since $dir will already be prefixed with "platform/", I think this should be changed to:

    echo "Building... $dir"
    pushd "$dir"

if [ -f package.json ]; then
if [ "\$(jq -r '.scripts.build' package.json)" != "null" ]; then
NODE_ENV=production yarn build
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I get the following error at this line:

Building... platform/integration-tests
~/Development/plasmic/platform/integration-tests ~/Development/plasmic
yarn run v1.22.22
error Command "build" not found.

I think this should be changed to remove the backslash on line 44, ie:

    if [ -f package.json ]; then
        if [ "$(jq -r '.scripts.build' package.json)" != "null" ]; then
            NODE_ENV=production yarn build

fi
fi
popd
echo "Done..."
echo ""
done

pushd platform/wab
make
NODE_ENV=production yarn build-css
export PUBLIC_URL="${PUBLIC_URL:-http://localhost:3003}"
echo "Building... wab for $PUBLIC_URL"
NODE_ENV=production yarn build
echo "Done..."
popd