add codeowners
Signed-off-by: Vincenzo Scamporlino <vincenzos@spotify.com>
This commit is contained in:
parent
b3c18f15f2
commit
bacec142f7
|
|
@ -1,11 +1,15 @@
|
|||
#!/bin/bash
|
||||
|
||||
pushd ./workspaces
|
||||
printf "\033[1;34mEnter a name for the new workspace [required] \033[0m"
|
||||
read -r name
|
||||
|
||||
npx --yes @backstage/create-app
|
||||
printf "\033[1;34mWho are the codeowners (GitHub usernames) of the new workspace? [required] \033[0m"
|
||||
read -r codeowners
|
||||
|
||||
popd
|
||||
WORKSPACE_PATH="workspaces/${name}"
|
||||
|
||||
# customize name of the project
|
||||
# make the setup correct
|
||||
# skip yarn install
|
||||
echo $name | npx --yes @backstage/create-app --path $WORKSPACE_PATH --skip-install
|
||||
|
||||
jq --arg name "$name" '.name = $name' ${WORKSPACE_PATH}/package.json > ${WORKSPACE_PATH}/package.json.tmp && mv ${WORKSPACE_PATH}/package.json.tmp ${WORKSPACE_PATH}/package.json
|
||||
|
||||
echo "/${WORKSPACE_PATH} ${codeowners}" >> .github/CODEOWNERS
|
||||
|
|
|
|||
Loading…
Reference in New Issue