Created
September 9, 2017 09:14
-
-
Save vrymel/f9950b7a20e572e8a7ef6d727cd897d3 to your computer and use it in GitHub Desktop.
Command steps to rename a Phoenix project
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# tested on macOS 10.12.4 | |
# based on https://elixirforum.com/t/how-to-change-a-phoenix-project-name-smoothly/1217/6 | |
# replace values as necessary | |
current_otp="hello_phoenix" | |
current_name="HelloPhoenix" | |
new_otp="" | |
new_name="" | |
git grep -l $current_otp | xargs sed -i '' -e 's/'$current_otp'/'$new_otp'/g' | |
git grep -l $current_name | xargs sed -i '' -e 's/'$current_name'/'$new_name'/g' | |
mv ./lib/$current_otp ./lib/$new_otp | |
mv ./lib/$current_otp.ex ./lib/$new_otp.ex |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thank you, that was really helpful.
The only thing that is missing is moving the
_web
directory. Which I just did manually.