-
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
985f781
commit d051906
Showing
8 changed files
with
95 additions
and
35 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,13 @@ | ||
#!/usr/bin/env fish | ||
|
||
cd (dirname (status --current-filename)) | ||
source common.sh | ||
|
||
echo "Building react-activity-calendar...." | ||
cd ../react-activity-calendar; | ||
and git checkout main &> /dev/null; | ||
and git pull &> /dev/null; | ||
and pnpm i --ignore-scripts > /dev/null; | ||
and pnpm build &> /dev/null; or abort "Failed to build react-activity-calendar"; | ||
and cd -; | ||
or abort "failed building" |
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,5 @@ | ||
function abort | ||
set_color red; | ||
echo "Error: $argv" | ||
exit 1 | ||
end |
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 |
---|---|---|
@@ -1,2 +1,3 @@ | ||
#!/usr/bin/env fish | ||
echo "Killing processes on port 3001-3004" | ||
kill (lsof -ti:3001,3002,3003,3004) &> /dev/null |
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,41 @@ | ||
#!/usr/bin/env fish | ||
|
||
cd (dirname (status --current-filename)) | ||
source common.sh | ||
|
||
./kill.sh | ||
|
||
set -l pids | ||
cd ../frameworks | ||
for p in */package.json | ||
set -l framework (dirname $p); | ||
and cd $framework; or abort "cd"; | ||
and pnpm i --ignore-scripts > /dev/null; or abort "failed installing packages"; | ||
and cp -r ../../react-activity-calendar/build node_modules/react-activity-calendar/; or abort "copying build artifacts failed"; | ||
and pnpm run "$argv[1]-test" > /dev/null & | ||
|
||
set -l pid $last_pid | ||
set -a pids $pid; | ||
and echo "Starting $framework (pid $pid)..."; | ||
and cd -; | ||
or abort "unknown" | ||
end | ||
|
||
set sleep 10 | ||
if test "$argv[1]" = "dev" | ||
set sleep 3 | ||
end | ||
|
||
echo "Waiting $sleep s for servers to start..." | ||
sleep $sleep | ||
|
||
for pid in $pids; | ||
if not ps -p $pid > /dev/null | ||
abort "$pid not running" | ||
end | ||
end | ||
|
||
open http://localhost:3001 | ||
open http://localhost:3002 | ||
open http://localhost:3003 | ||
open http://localhost:3004 |
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,13 @@ | ||
#!/usr/bin/env fish | ||
|
||
cd (dirname (status --current-filename)) | ||
source common.sh | ||
|
||
echo "Fetching react-activity-calendar..." | ||
git submodule update --init > /dev/null; | ||
and cd ../react-activity-calendar &> /dev/null; | ||
and git checkout main &> /dev/null; | ||
and git pull > /dev/null; | ||
and cd -; | ||
or abort "failed fetching" | ||
|
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,12 @@ | ||
#!/usr/bin/env fish | ||
|
||
if test "$argv[1]" != "dev" -a "$argv[1]" != "ssr" | ||
set p (basename (status -f)) | ||
echo "Usage: $p [dev|ssr]" | ||
exit 1 | ||
end | ||
|
||
cd (dirname (status --current-filename)) | ||
./scripts/upgrade.sh | ||
./scripts/build.sh | ||
./scripts/run.sh $argv |
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,10 @@ | ||
#!/usr/bin/env fish | ||
|
||
if test "$argv[1]" != "dev" -a "$argv[1]" != "ssr" | ||
set p (basename (status -f)) | ||
echo "Usage: $p [dev|ssr]" | ||
exit 1 | ||
end | ||
|
||
cd (dirname (status --current-filename)) | ||
./scripts/run.sh $argv |