Skip to content

Commit

Permalink
fix: dist 디렉토리가 존재하지 않을 때에도 빌드 명령어를 수행하도록 변경, EOL 수정 (#ATR-588)
Browse files Browse the repository at this point in the history
  • Loading branch information
SWARVY committed Jul 29, 2024
1 parent af5547f commit bf0dab2
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 5 deletions.
6 changes: 5 additions & 1 deletion packages/design-system/build.bash
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

SRC_DIR="src"
CHECKSUM_FILE="src_checksums.txt"
DIST_DIR="dist"

generate_checksums() {
local dir_path="$1"
Expand Down Expand Up @@ -45,7 +46,10 @@ fi
if [ "$build_needed" = true ]; then
echo "[📚design-system] A file change in the directory was detected. The build has started."
tsup
elif [ ! -d "$DIST_DIR" ] || [ ! "$(ls -A $DIST_DIR)" ]; then
echo "[📚design-system] The build file does not exist. The build has started."
tsup
else
echo "[📚design-system] No file changes were detected at the directory. The build has cancelled."
exit 0
fi
fi
2 changes: 1 addition & 1 deletion packages/icons/build.bash
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ if [ -n "$(find "$DIR_PATH" -type f -print -quit)" ]; then
else
echo "[🔮icons] Build directory isn't exist. Build command executed"
tsup
fi
fi
2 changes: 1 addition & 1 deletion packages/icons/renew.bash
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@ if [ "$renew_needed" = true ]; then
else
echo "[🔮icons] SVG Component is up to date. SVG component creation is cancelled."
exit 0
fi
fi
6 changes: 5 additions & 1 deletion packages/utils/build.bash
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

SRC_DIR="src"
CHECKSUM_FILE="src_checksums.txt"
DIST_DIR="dist"

generate_checksums() {
local dir_path="$1"
Expand Down Expand Up @@ -43,7 +44,10 @@ if [ "$src_changed" -eq 1 ]; then
fi

if [ "$build_needed" = true ]; then
echo "[⚙️utils] A file change in the directory was detected. The build has started."
echo "[📚design-system] A file change in the directory was detected. The build has started."
tsup
elif [ ! -d "$DIST_DIR" ] || [ ! "$(ls -A $DIST_DIR)" ]; then
echo "[📚design-system] The build file does not exist. The build has started."
tsup
else
echo "[⚙️utils] No file changes were detected at the directory. The build has cancelled."
Expand Down
2 changes: 1 addition & 1 deletion packages/utils/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
"moduleResolution": "bundler",
"jsx": "preserve",
}
}
}

0 comments on commit bf0dab2

Please sign in to comment.