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 0c294bd
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 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 All @@ -22,7 +30,7 @@ publish_forge_pkg() {
mv "packages/$pkg"/src .
mv "packages/$pkg"/README.md .
rm -fr "packages/$pkg"
git commit -am "$version"
Git commit -am "$version"
git push origin "$pkg"

git checkout main
Expand Down

0 comments on commit 0c294bd

Please sign in to comment.