Improve recipe new
subcommand
This commit is contained in:
parent
2cd1d053f0
commit
935007dd86
7
abra
7
abra
@ -1881,6 +1881,7 @@ Create a new application recipe called <recipe>."
|
|||||||
|
|
||||||
sub_recipe_create() {
|
sub_recipe_create() {
|
||||||
recipe="$abra__recipe_"
|
recipe="$abra__recipe_"
|
||||||
|
recipe_kebab="${recipe//-/_}"
|
||||||
|
|
||||||
recipe_dir="$ABRA_DIR/apps/$recipe"
|
recipe_dir="$ABRA_DIR/apps/$recipe"
|
||||||
|
|
||||||
@ -1894,7 +1895,11 @@ sub_recipe_create() {
|
|||||||
|
|
||||||
cd "$recipe_dir" || error "Failed to create directory '$recipe_dir'"
|
cd "$recipe_dir" || error "Failed to create directory '$recipe_dir'"
|
||||||
|
|
||||||
rm -rf .git .gitea
|
rm -rf .git .gitea .drone.yml
|
||||||
|
|
||||||
|
sed -i "s/\${REPO_NAME}/$recipe/g" README.md
|
||||||
|
sed -i "s/\${REPO_NAME_TITLE}/$recipe/g" README.md
|
||||||
|
sed -i "s/\${REPO_NAME_KEBAB}/$recipe_kebab/g" .env.sample
|
||||||
|
|
||||||
success "New recipe created in '$recipe_dir', happy hacking! 👌"
|
success "New recipe created in '$recipe_dir', happy hacking! 👌"
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user