Skip to content

Commit

Permalink
Update bin/setup (#1933)
Browse files Browse the repository at this point in the history
* Switch phantomjs for chromedriver
* Stop trying to join the Heroku app
    - Heroku keep changing the way this command works and most public users
can't access it anyway.
* Drop requirement for Foreman
    - You don't need it, so don't push it.
  • Loading branch information
nickcharlton authored Mar 9, 2021
1 parent 059718d commit 32d224a
Showing 1 changed file with 3 additions and 26 deletions.
29 changes: 3 additions & 26 deletions bin/setup
Original file line number Diff line number Diff line change
Expand Up @@ -23,34 +23,11 @@ bundle exec rake db:setup dev:prime
# Add binstubs to PATH via export PATH=".git/safe/../../bin:$PATH" in ~/.zshenv
mkdir -p .git/safe

# Pick a port for Foreman
if ! grep --quiet --no-messages --fixed-strings 'port' .foreman; then
printf 'port: 3000\n' >> .foreman
fi

if ! command -v foreman > /dev/null; then
printf 'Foreman is not installed.\n'
printf 'See https://github.com/ddollar/foreman for install instructions.\n'
fi

if ! command -v phantomjs > /dev/null; then
printf 'Phantomjs is not installed.\n'
printf 'See http://phantomjs.org/download.html for install instructions.\n'
if ! command -v chromedriver > /dev/null; then
printf 'chromedriver is not installed.\n'
printf 'See https://chromedriver.chromium.org for install instructions.\n'
fi

# Only if this isn't CI
# if [ -z "$CI" ]; then
# fi

if ! command -v heroku > /dev/null; then
printf 'Heroku is not installed.\n'
printf "You'l need it to contribute to the demo app\n"
printf 'https://devcenter.heroku.com/articles/heroku-cli for install instructions\n'
else
if heroku join --app administrate-prototype > /dev/null 2>&1; then
git remote add staging git@heroku.com:administrate-prototype.git || true
printf 'You are a collaborator on the "administrate-prototype" Heroku app\n'
else
printf 'Ask for access to the "administrate-prototype" Heroku app\n'
fi
fi

0 comments on commit 32d224a

Please sign in to comment.