Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/scripts/setup-keycloak.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

export KC_VERSION=26.2.5
curl -LO https://github.com/keycloak/keycloak/releases/download/"${KC_VERSION}"/keycloak-"${KC_VERSION}".zip
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

# https://stackoverflow.com/a/14203146
for i in "$@"; do
Expand Down
2 changes: 1 addition & 1 deletion demo/bump-deps.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

GIT_REV=$(git show-ref main --heads -s)

Expand Down
2 changes: 1 addition & 1 deletion demo/compose.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

cd "../cli"

Expand Down
2 changes: 1 addition & 1 deletion demo/deploy.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e

fly deploy -a product-api --dockerfile ./docker/products.Dockerfile
Expand Down
2 changes: 1 addition & 1 deletion demo/update_token.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -eu

fly secrets set -a product-api GRAPH_API_TOKEN="$GRAPH_API_TOKEN"
Expand Down
2 changes: 1 addition & 1 deletion docker/clickhouse/init-db.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e

clickhouse client -n <<-EOSQL
Expand Down
2 changes: 1 addition & 1 deletion docker/nats/build-push.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

# Exit on any error
set -e
Expand Down
4 changes: 2 additions & 2 deletions examples/full-cosmo-docker/destroy.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e

cd ../.. && make full-demo-down
cd ../.. && make full-demo-down
4 changes: 2 additions & 2 deletions examples/full-cosmo-docker/start.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e

cd ../.. && make full-demo-up
cd ../.. && make full-demo-up
2 changes: 1 addition & 1 deletion examples/full-cosmo-helm/create_demo.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e

# Install WunderGraph CLI
Expand Down
2 changes: 1 addition & 1 deletion examples/full-cosmo-helm/delete_demo.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e

. ../../scripts/configurations/kubernetes.sh
Expand Down
2 changes: 1 addition & 1 deletion examples/router-simple/start.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e

# Install WunderGraph CLI
Expand Down
2 changes: 1 addition & 1 deletion helm/cosmo/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ This is the official Helm Chart for WunderGraph Cosmo - The Full Lifecycle Graph
| clickhouse.commonAnnotations."kapp.k14s.io/change-group" | string | `"cosmo.apps.clickhouse.wundergraph.com/deployment"` | |
| clickhouse.image.registry | string | `"docker.io"` | |
| clickhouse.image.repository | string | `"bitnamilegacy/clickhouse"` | |
| clickhouse.initdbScripts."db-init.sh" | string | `"#!/bin/bash\nset -e\nclickhouse-client --user $CLICKHOUSE_ADMIN_USER --password $CLICKHOUSE_ADMIN_PASSWORD -n <<-EOSQL\n CREATE DATABASE IF NOT EXISTS cosmo;\nEOSQL\n"` | |
| clickhouse.initdbScripts."db-init.sh" | string | `"#!/usr/bin/env bash\nset -e\nclickhouse-client --user $CLICKHOUSE_ADMIN_USER --password $CLICKHOUSE_ADMIN_PASSWORD -n <<-EOSQL\n CREATE DATABASE IF NOT EXISTS cosmo;\nEOSQL\n"` | |
| clickhouse.persistence.annotations."kapp.k14s.io/owned-for-deletion" | string | `""` | |
| clickhouse.persistence.size | string | `"2Gi"` | |
| clickhouse.replicaCount | int | `1` | |
Expand Down
2 changes: 1 addition & 1 deletion helm/cosmo/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@ clickhouse:
password: 'changeme'
initdbScripts:
db-init.sh: |
#!/bin/bash
#!/usr/bin/env bash
set -e
clickhouse-client --user $CLICKHOUSE_ADMIN_USER --password $CLICKHOUSE_ADMIN_PASSWORD -n <<-EOSQL
CREATE DATABASE IF NOT EXISTS cosmo;
Expand Down
2 changes: 1 addition & 1 deletion keycloak/theme/build.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

set -euo pipefail

Expand Down
2 changes: 1 addition & 1 deletion router-tests/bump-deps.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

GIT_REV=$(git rev-parse --short HEAD)

Expand Down
2 changes: 1 addition & 1 deletion router-tests/testdata/tls/makecert.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

# useful to test mTLS with self-signed certificates
openssl req -newkey rsa:2048 \
Expand Down
2 changes: 1 addition & 1 deletion router-tests/update-config-no-edg.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

# js composition

Expand Down
2 changes: 1 addition & 1 deletion router-tests/update-config.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

# js composition

Expand Down
2 changes: 1 addition & 1 deletion router/__schemas/compose.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

# export COSMO_API_KEY=cosmo_669b576aaadc10ee1ae81d9193425705
# export COSMO_API_URL=http://localhost:3001
Expand Down
2 changes: 1 addition & 1 deletion router/__schemas/full-plugin-project.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

rm -rf cosmo

Expand Down
2 changes: 1 addition & 1 deletion router/__schemas/plugin.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

rm -rf ../plugins

Expand Down
2 changes: 1 addition & 1 deletion scripts/bench-create.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e

# Create and publish a demo federated graph based on the subgraphs in the demo folder
Expand Down
2 changes: 1 addition & 1 deletion scripts/bench-delete.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e

# Delete the demo
Expand Down
2 changes: 1 addition & 1 deletion scripts/bench-router.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

cd "../router"

Expand Down
2 changes: 1 addition & 1 deletion scripts/bench-update.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e

cd "../cli"
Expand Down
2 changes: 1 addition & 1 deletion scripts/configurations/kubernetes.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e

export COSMO_API_KEY=cosmo_669b576aaadc10ee1ae81d9193425705
Expand Down
2 changes: 1 addition & 1 deletion scripts/configurations/local.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e

export COSMO_API_KEY=cosmo_669b576aaadc10ee1ae81d9193425705
Expand Down
11 changes: 9 additions & 2 deletions scripts/create-cli-demo.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,19 @@
#!/bin/bash
#!/usr/bin/env bash
set -e

# Create demo using the published CLI
# Create and publish a demo federated graph based on the subgraphs in the demo folder

. ./scripts/configurations/local.sh

npm install -g wgc@latest
# Check if wgc is available, install locally if not
if ! command -v wgc &> /dev/null; then
echo "wgc not found, installing locally..."
export NPM_CONFIG_PREFIX="${NPM_CONFIG_PREFIX:-$HOME/.npm-global}"
export PATH="$NPM_CONFIG_PREFIX/bin:$PATH"
mkdir -p "$NPM_CONFIG_PREFIX"
npm install -g --prefix "$NPM_CONFIG_PREFIX" wgc@latest
fi

wgc federated-graph create mygraph --namespace default --label-matcher team=A,team=B --routing-url http://localhost:3002/graphql

Expand Down
2 changes: 1 addition & 1 deletion scripts/create-cloud-demo.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e

# Create and publish a demo federated graph based on the subgraphs in the demo folder
Expand Down
2 changes: 1 addition & 1 deletion scripts/create-docker-demo.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e

# Create and publish a demo federated graph based on the subgraphs in the demo folder
Expand Down
2 changes: 1 addition & 1 deletion scripts/create-full-local-demo.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e

###################################################################################################################
Expand Down
2 changes: 1 addition & 1 deletion scripts/create-kubernetes-demo.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e

# Create and publish a demo federated graph based on the subgraphs in the demo folder
Expand Down
2 changes: 1 addition & 1 deletion scripts/create-local-demo.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e

# Create and publish a demo federated graph based on the subgraphs in the demo folder
Expand Down
2 changes: 1 addition & 1 deletion scripts/delete-docker-demo.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e

# Delete the demo
Expand Down
2 changes: 1 addition & 1 deletion scripts/delete-full-local-demo.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e

###################################################################################################################
Expand Down
2 changes: 1 addition & 1 deletion scripts/delete-kubernetes-demo.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Verification agent

🧩 Analysis chain

Shebang portability LGTM

Switching to env-based bash improves cross-distro portability (macOS, BSD, Nix, Guix, containers). No functional impact here.

To ensure no hardcoded /bin/bash shebangs remain, run:


🏁 Script executed:

#!/usr/bin/env bash
set -euo pipefail
rg -n '^\#\!\s*/bin/bash(\s|$)' || echo "No /bin/bash shebangs left"

Length of output: 209


Shebang portability LGTM – update verification regex

File: scripts/delete-kubernetes-demo.sh
Lines: 1-1

#!/usr/bin/env bash

Shebang portability LGTM
Switching to an env-based bash shebang improves cross-distro portability (macOS, BSD, Nix, Guix, containers). No functional impact here.

To ensure there are no remaining hardcoded /bin/bash shebangs, update the verification command to use a Rust-compatible regex:

#!/usr/bin/env bash
set -euo pipefail
rg -n '^#!\s*/bin/bash(\s|$)' || echo "No /bin/bash shebangs left"
🤖 Prompt for AI Agents
In scripts/delete-kubernetes-demo.sh at line 1, the shebang is correctly updated
to use /usr/bin/env bash for portability. To complete this improvement, add the
suggested verification command using ripgrep with the Rust-compatible regex to
check for any remaining hardcoded /bin/bash shebangs. This involves appending
the lines setting strict bash options and the rg command as shown, ensuring the
script can verify no hardcoded shebangs remain.

set -e

# Create and publish a demo federated graph based on the subgraphs in the demo folder
Expand Down
2 changes: 1 addition & 1 deletion scripts/delete-local-demo.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e

# Delete the demo
Expand Down
2 changes: 1 addition & 1 deletion scripts/demo-router.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

cd "../router"

Expand Down
10 changes: 8 additions & 2 deletions scripts/setup-fulldemo.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

echo ""
echo "Setting up keycloak and seeding the database ..."
Expand All @@ -22,6 +22,12 @@ make create-cli-demo

echo "Demo project created successfully."

# Ensure wgc is available in PATH
if ! command -v wgc &> /dev/null; then
export NPM_CONFIG_PREFIX="${NPM_CONFIG_PREFIX:-$HOME/.npm-global}"
export PATH="$NPM_CONFIG_PREFIX/bin:$PATH"
fi

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think its better to move changes to wgc to a separate commit.
Also rebase instead of pulling merge commits.

(Just my suggestions, I just came across this pr and not a contributor to this repo)

token=$(wgc router token create mytoken --graph-name mygraph --namespace default -r)

echo ''
Expand All @@ -46,4 +52,4 @@ echo ""
echo "Login: [email protected]"
echo "Password: wunder@123"
echo ""
echo "To see the playground of the router, navigate to http://localhost:3002"
echo "To see the playground of the router, navigate to http://localhost:3002"
2 changes: 1 addition & 1 deletion scripts/update-demo.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
set -e

SUBGRAPHS="employees family hobbies products availability mood employeeupdated"
Expand Down
2 changes: 1 addition & 1 deletion studio/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

# Variables
envFilename='.env.production'
Expand Down
Loading