Skip to content

Commit

Permalink
Update setup.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
mrhardikjoshi committed Sep 25, 2024
1 parent ed65c77 commit de93a0b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion e2e_tests/setup.sh
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
#!/bin/sh

# Example values of environment variables ACTIVE_MODEL_VERSION=7.1.3 ACTIVEGRAPH_PATH=../ E2E_PORT=7687 E2E_NO_CRED=true

rm -r myapp
gem install rails -v $ACTIVE_MODEL_VERSION --no-document

if [[ -n "$ACTIVEGRAPH_PATH" ]]
then
sed 's|.*gem '"'"'activegraph'"'"'.*|gem '"'"'activegraph'"'"', path: "'"$ACTIVEGRAPH_PATH"'"|' docs/activegraph.rb > template.tmp
else
sed 's/.*gem '"'"'activegraph'"'"'.*/gem '"'"'activegraph'"'"', github: "neo4jrb\/activegraph", ref: "'"$1"'"/' docs/activegraph.rb > template.tmp
sed 's/.*gem '"'"'activegraph'"'"'.*/gem '"'"'activegraph'"'"', path: "."/' docs/activegraph.rb > template.tmp
fi

rails \_$ACTIVE_MODEL_VERSION\_ new myapp -O -m ./template.tmp
Expand Down

0 comments on commit de93a0b

Please sign in to comment.