-
Notifications
You must be signed in to change notification settings - Fork 18
Fix space issue in some of the CI workflows #2332
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,57 @@ | ||||||||||||||
| #!/bin/bash | ||||||||||||||
|
|
||||||||||||||
| # Set strict error handling | ||||||||||||||
| set -euxo pipefail | ||||||||||||||
|
|
||||||||||||||
| echo "Starting project setup..." | ||||||||||||||
|
|
||||||||||||||
| # Environment variables that need to be set (commented out as reference) | ||||||||||||||
| # export CI_DEPLOY_SEPOLIA_RPC_URL="" | ||||||||||||||
| # export CI_FORK_SEPOLIA_DEPLOYER_ADDRESS="" | ||||||||||||||
| # export CI_FORK_SEPOLIA_BLOCK_NUMBER="" | ||||||||||||||
| # export CI_DEPLOY_POLYGON_RPC_URL="" | ||||||||||||||
| # export CI_SEPOLIA_METABOARD_URL="" | ||||||||||||||
| # export RPC_URL_ETHEREUM_FORK="" | ||||||||||||||
| # export COMMIT_SHA="" | ||||||||||||||
|
|
||||||||||||||
| # Keep environment variables when using nix-develop | ||||||||||||||
| keep=( | ||||||||||||||
| -k CI_DEPLOY_SEPOLIA_RPC_URL | ||||||||||||||
| -k CI_FORK_SEPOLIA_DEPLOYER_ADDRESS | ||||||||||||||
| -k CI_FORK_SEPOLIA_BLOCK_NUMBER | ||||||||||||||
| -k CI_DEPLOY_POLYGON_RPC_URL | ||||||||||||||
| -k CI_SEPOLIA_METABOARD_URL | ||||||||||||||
| -k RPC_URL_ETHEREUM_FORK | ||||||||||||||
| -k COMMIT_SHA | ||||||||||||||
| -k PUBLIC_WALLETCONNECT_PROJECT_ID | ||||||||||||||
| ) | ||||||||||||||
|
|
||||||||||||||
| echo "Preparing base setup..." | ||||||||||||||
| ./prep-base.sh | ||||||||||||||
|
|
||||||||||||||
| echo "Building packages..." | ||||||||||||||
| nix develop -i ${keep[@]} -c bash -c '(npm run build -w @rainlanguage/orderbook)' | ||||||||||||||
| nix develop -i ${keep[@]} -c bash -c '(npm run build -w @rainlanguage/ui-components && npm run build -w @rainlanguage/webapp)' | ||||||||||||||
|
|
||||||||||||||
| # Temporarily disable command echoing | ||||||||||||||
| set +x | ||||||||||||||
|
|
||||||||||||||
| export LANG=en_US.UTF-8 | ||||||||||||||
| export LC_ALL=en_US.UTF-8 | ||||||||||||||
|
|
||||||||||||||
| GREEN='\033[0;32m' | ||||||||||||||
| NC='\033[0m' # No Color | ||||||||||||||
|
Comment on lines
+42
to
+43
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Remove unused variables. Lines 42-43 define Apply this diff: export LANG=en_US.UTF-8
export LC_ALL=en_US.UTF-8
-GREEN='\033[0;32m'
-NC='\033[0m' # No Color
-
# Print the completion message📝 Committable suggestion
Suggested change
🧰 Tools🪛 Shellcheck (0.11.0)[warning] 42-42: GREEN appears unused. Verify use (or export if used externally). (SC2034) [warning] 43-43: NC appears unused. Verify use (or export if used externally). (SC2034) 🤖 Prompt for AI Agents |
||||||||||||||
|
|
||||||||||||||
| # Print the completion message | ||||||||||||||
| printf "\033[0;32m" # Set text to green | ||||||||||||||
| printf "╔════════════════════════════════════════════════════════════════════════╗\n" | ||||||||||||||
| printf "║ Setup Complete! ║\n" | ||||||||||||||
| printf "╠════════════════════════════════════════════════════════════════════════╣\n" | ||||||||||||||
| printf "║ How to run the apps: ║\n" | ||||||||||||||
| printf "║ ║\n" | ||||||||||||||
| printf "║ To run webapp: cd packages/webapp && nix develop -c npm run dev ║\n" | ||||||||||||||
| printf "╚════════════════════════════════════════════════════════════════════════╝\n" | ||||||||||||||
| printf "\033[0m" # Reset text color | ||||||||||||||
|
|
||||||||||||||
| # Re-enable command echoing | ||||||||||||||
| set -x | ||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix array expansion to prevent re-splitting.
Double-quote the array expansion to follow shell best practices and avoid unintended re-splitting if array elements contain spaces.
Apply this diff:
📝 Committable suggestion
🧰 Tools
🪛 Shellcheck (0.11.0)
[error] 33-33: Double quote array expansions to avoid re-splitting elements.
(SC2068)
[error] 34-34: Double quote array expansions to avoid re-splitting elements.
(SC2068)
🤖 Prompt for AI Agents