Skip to content

Commit

Permalink
fix: update find rm command
Browse files Browse the repository at this point in the history
  • Loading branch information
sripwoud committed Jul 10, 2024
1 parent 971caaf commit 45dbcc1
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions scripts/publish.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,16 @@ publish_npm() {

clean() {
pkg="$1"
exclude_regex="\.\|\./\.git\|\./packages\|\./\|\./packages/$pkg\|\./LICENSE"
find . -maxdepth 2 -not -regex "$exclude_regex" -exec rm -rf {} +
# TODO: use regex instead
find . -maxdepth 2 \
! -path . \
! -path ./.git \
! -path "./.git/*" \
! -path ./.gitignore \
! -path ./packages \
! -path ./LICENSE \
! -path "./packages/$pkg" \
-exec rm -rf {} +
}

publish_forge_pkg() {
Expand Down

0 comments on commit 45dbcc1

Please sign in to comment.