-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create a script to zip minifront/node-status dist directories for dep…
…loying to core (#931) * Create a script to zip minifront/node-status dist directories for deploying to core * Rename script * Update deployment checklist
- Loading branch information
1 parent
5304f50
commit 8ddbaeb
Showing
2 changed files
with
36 additions
and
1 deletion.
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
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,35 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Runs `pnpm build`, then zips the `dist` directories for both minifront and | ||
# node-status so that they can be PRed to the core repo. | ||
# | ||
# Usage: | ||
# sh ./scripts/build-for-deployment -o /tmp | ||
# | ||
# Options: | ||
# -o Output directory for the zipped files. (default: present directory) | ||
# -r Root directory of the repo, if you're not running this script from the repo | ||
# root. (default: present directory) | ||
|
||
OUTPUT_DIR=$(pwd) | ||
REPO_ROOT=$(pwd) | ||
|
||
while getopts "o:r:" opt; do | ||
case $opt in | ||
o) OUTPUT_DIR="$OPTARG" | ||
;; | ||
r) REPO_ROOT="$OPTARG" | ||
;; | ||
esac | ||
done | ||
|
||
cd $REPO_ROOT | ||
pnpm build | ||
|
||
cd $REPO_ROOT/apps/minifront/dist | ||
zip -r minifront.zip * | ||
mv minifront.zip ${OUTPUT_DIR} | ||
|
||
cd $REPO_ROOT/apps/node-status/dist | ||
zip -r node-status.zip * | ||
mv node-status.zip ${OUTPUT_DIR} |