-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add build.sh and entrypoint.sh for building and packing packages
- Loading branch information
1 parent
bafc30a
commit 15660a9
Showing
3 changed files
with
28 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 |
---|---|---|
|
@@ -174,3 +174,4 @@ dist | |
# Finder (MacOS) folder config | ||
.DS_Store | ||
.turbo | ||
.vscode |
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 @@ | ||
for ext in $(ls extensions); do | ||
# Check if ext is a directory and contains package.json | ||
if [ ! -d "extensions/$ext" ] || [ ! -f "extensions/$ext/package.json" ]; then | ||
echo "Skipping $ext" | ||
continue | ||
fi | ||
echo "Building $ext" | ||
docker run -v $(pwd)/entrypoint.sh:/entrypoint.sh \ | ||
-v $(pwd)/extensions/$ext:/workspace \ | ||
-w /workspace --rm \ | ||
--platform=linux/amd64 \ | ||
node:20 /entrypoint.sh | ||
done |
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,14 @@ | ||
cd /workspace | ||
rm *.tgz | ||
cp -r /workspace /workspace-copy | ||
cd /workspace-copy | ||
npm i | ||
npm run build | ||
npm pack | ||
# check number of *.tgz file in current directory | ||
# if more than 1, then exit with error | ||
if [ $(ls -1 *.tgz 2>/dev/null | wc -l) -gt 1 ]; then | ||
echo "More than one tgz file found" | ||
exit 1 | ||
fi | ||
cp *.tgz /workspace |