Skip to content

Commit

Permalink
build sequentially for alpha tagging
Browse files Browse the repository at this point in the history
  • Loading branch information
LiranCohen committed Aug 27, 2024
1 parent 765f465 commit 202b2af
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 2 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/alpha-npm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,13 @@ jobs:
node ./scripts/bump-workspace.mjs --prerelease=$ALPHA_PRERELEASE
shell: bash

- name: Build all workspace packages
- name: Make build script executable
run: chmod +x ./scripts/build-workspace.sh

- name: Build all workspace packages sequentially
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
run: pnpm --recursive --stream build
run: ./scripts/build-workspace.sh

- name: Publish selected @web5/* packages
env:
Expand Down
32 changes: 32 additions & 0 deletions scripts/build-sequentially.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#!/bin/bash

# Array of folders to loop through
folders=(
"packages/crypto"
"packages/crypto-aws-kms"
"packages/common"
"packages/dids"
"packages/credentials"
"packages/agent"
"packages/identity-agent"
"packages/proxy-agent"
"packages/user-agent"
"packages/api"
)

# Get the directory of the script
script_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"

# Navigate to the root directory (assumes the script is in /scripts/)
root_dir="$(dirname "$script_dir")"
cd "$root_dir" || { echo "Failed to navigate to root directory"; exit 1; }

# Loop through each folder
for folder in "${folders[@]}"; do
echo "Building in $folder"
cd "$folder" || { echo "Failed to navigate to $folder"; exit 1; }
pnpm build || { echo "Build failed in $folder"; exit 1; }
cd "$root_dir" # Return to the root directory
done

echo "All builds completed successfully."

0 comments on commit 202b2af

Please sign in to comment.