-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
547393f
commit fb13ff1
Showing
1 changed file
with
38 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
#!/bin/bash | ||
|
||
npm run build | ||
|
||
|
||
|
||
output_dir="./build_file" | ||
rm -rf $output_dir | ||
mkdir $output_dir | ||
search_dir="./packages/" | ||
|
||
for package in `ls $search_dir`; do | ||
package_dist="$search_dir$package/dist/"; | ||
cp -r $package_dist $output_dir | ||
done | ||
|
||
|
||
|
||
git stash | ||
git branch -D gh-pages | ||
git fetch -p | ||
git checkout -b gh-pages origin/gh-pages | ||
|
||
|
||
for file in ./*; do | ||
# echo $file; | ||
if [[ "$file" != "./post-github.sh" && | ||
"$file" != "./build_file" && | ||
"$file" != "./packages" && | ||
"$file" != "./node_modules" | ||
]]; then | ||
rm -r "$file" | ||
fi | ||
done | ||
|
||
|
||
mv $output_dir/* ./ | ||
rm -rf $output_dir |