Skip to content

Commit

Permalink
More verbose output when calling next --init (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
etagwerker authored and jnraine committed Apr 16, 2019
1 parent 4f95e77 commit b37dc83
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion exe/next.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#!/bin/bash
if [[ "${@}" == "--init" ]]; then
echo "doing a thing"
# Add next? top of Gemfile
cat <<-STRING > Gemfile.tmp
def next?
Expand All @@ -11,6 +10,19 @@ STRING
mv Gemfile.tmp Gemfile

ln -s Gemfile Gemfile.next
echo <<-MESSAGE
Created Gemfile.next (a symlink to your Gemfile). Your Gemfile has been modified to support dual-booting!
There's just one more step: modify your Gemfile to use a newer version of Rails using the \`next?\` helper method.
For example, here's how to go from 5.2.3 to 6.0:
if next?
gem "rails", "6.0.0"
else
gem "rails", "5.2.3"
end
MESSAGE
exit $?
fi

Expand Down

0 comments on commit b37dc83

Please sign in to comment.