-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2094 from cardstack/cs-7779-add-a-pre-start-scrip…
…t-for-host-to-verify-if-the-boxel-ui Host's pnpm start now builds boxel-ui before host if boxel-ui dist dir is out of date
- Loading branch information
Showing
5 changed files
with
29 additions
and
9 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
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 |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#! /bin/sh | ||
|
||
CURRENT_DIR="$(pwd)" | ||
SCRIPTS_DIR="$(cd "$(dirname "$0")" && pwd)" | ||
|
||
SRC_DIR="${SCRIPTS_DIR}/../src" | ||
DIST_DIR="${SCRIPTS_DIR}/../dist" | ||
|
||
if [ ! -d "$DIST_DIR" ]; then | ||
echo "boxel-ui/addon dist dir does not exist. Building in ${SRC_DIR}/.." | ||
cd "${SRC_DIR}/.." | ||
pnpm run build | ||
exit 0 | ||
fi | ||
|
||
mod_time_src=$(find "$SRC_DIR" -type f -exec stat -f %m {} + | sort -nr | head -n1) | ||
mod_time_dist=$(find "$DIST_DIR" -type f -exec stat -f %m {} + | sort -nr | head -n1) | ||
|
||
if [ "$mod_time_src" -gt "$mod_time_dist" ]; then | ||
echo "boxel-ui/addon dist dir is out of date. Building in ${SRC_DIR}/.." | ||
cd "${SRC_DIR}/.." | ||
pnpm run build | ||
else | ||
echo "✔️ boxel-ui/addon dist dir is up to date" | ||
fi |
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