From a7659a695f24fb917c3a3217b87ce595db1a2fb3 Mon Sep 17 00:00:00 2001 From: Samhita Alla Date: Thu, 29 Jul 2021 09:47:54 +0530 Subject: [PATCH] Update code of conduct (#1258) Signed-off-by: Ketan Umare --- .gitignore | 2 +- CODE_OF_CONDUCT.md | 5 ++--- .../flyte/code_of_conduct/CODE_OF_CONDUCT.md | 2 ++ boilerplate/flyte/code_of_conduct/README.rst | 2 ++ boilerplate/flyte/code_of_conduct/update.sh | 12 +++++++++++ .../flyte/{ => welcome_bot}/Readme.rst | 0 .../flyte/{ => welcome_bot}/config.yml | 0 boilerplate/flyte/{ => welcome_bot}/update.sh | 7 ++++--- boilerplate/update.cfg | 3 ++- boilerplate/update.sh | 20 +++++++++---------- 10 files changed, 34 insertions(+), 19 deletions(-) create mode 100644 boilerplate/flyte/code_of_conduct/CODE_OF_CONDUCT.md create mode 100644 boilerplate/flyte/code_of_conduct/README.rst create mode 100755 boilerplate/flyte/code_of_conduct/update.sh rename boilerplate/flyte/{ => welcome_bot}/Readme.rst (100%) rename boilerplate/flyte/{ => welcome_bot}/config.yml (100%) rename boilerplate/flyte/{ => welcome_bot}/update.sh (55%) diff --git a/.gitignore b/.gitignore index 056f9a2f61..1ae8f1602f 100644 --- a/.gitignore +++ b/.gitignore @@ -23,4 +23,4 @@ Chart.lock .cr-index/ bin/- bin/ -.python-version- +.python-version diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index 803d8a77f3..e12139d691 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -1,3 +1,2 @@ -This project is governed by [Lyft's code of -conduct](https://github.com/lyft/code-of-conduct). All contributors -and participants agree to abide by its terms. +This project is governed by LF AI Foundation's [code of conduct](https://lfprojects.org/policies/code-of-conduct/). +All contributors and participants agree to abide by its terms. diff --git a/boilerplate/flyte/code_of_conduct/CODE_OF_CONDUCT.md b/boilerplate/flyte/code_of_conduct/CODE_OF_CONDUCT.md new file mode 100644 index 0000000000..e12139d691 --- /dev/null +++ b/boilerplate/flyte/code_of_conduct/CODE_OF_CONDUCT.md @@ -0,0 +1,2 @@ +This project is governed by LF AI Foundation's [code of conduct](https://lfprojects.org/policies/code-of-conduct/). +All contributors and participants agree to abide by its terms. diff --git a/boilerplate/flyte/code_of_conduct/README.rst b/boilerplate/flyte/code_of_conduct/README.rst new file mode 100644 index 0000000000..0c9f2f1ec5 --- /dev/null +++ b/boilerplate/flyte/code_of_conduct/README.rst @@ -0,0 +1,2 @@ +CODE OF CONDUCT +~~~~~~~~~~~~~~~ diff --git a/boilerplate/flyte/code_of_conduct/update.sh b/boilerplate/flyte/code_of_conduct/update.sh new file mode 100755 index 0000000000..42f6158460 --- /dev/null +++ b/boilerplate/flyte/code_of_conduct/update.sh @@ -0,0 +1,12 @@ +#!/usr/bin/env bash + +# WARNING: THIS FILE IS MANAGED IN THE 'BOILERPLATE' REPO AND COPIED TO OTHER REPOSITORIES. +# ONLY EDIT THIS FILE FROM WITHIN THE 'FLYTEORG/BOILERPLATE' REPOSITORY: +# +# TO OPT OUT OF UPDATES, SEE https://github.com/flyteorg/boilerplate/blob/master/Readme.rst + +set -e + +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )" + +cp ${DIR}/CODE_OF_CONDUCT.md ${DIR}/../../../CODE_OF_CONDUCT.md diff --git a/boilerplate/flyte/Readme.rst b/boilerplate/flyte/welcome_bot/Readme.rst similarity index 100% rename from boilerplate/flyte/Readme.rst rename to boilerplate/flyte/welcome_bot/Readme.rst diff --git a/boilerplate/flyte/config.yml b/boilerplate/flyte/welcome_bot/config.yml similarity index 100% rename from boilerplate/flyte/config.yml rename to boilerplate/flyte/welcome_bot/config.yml diff --git a/boilerplate/flyte/update.sh b/boilerplate/flyte/welcome_bot/update.sh similarity index 55% rename from boilerplate/flyte/update.sh rename to boilerplate/flyte/welcome_bot/update.sh index 506c3221b7..2db64ac3f1 100755 --- a/boilerplate/flyte/update.sh +++ b/boilerplate/flyte/welcome_bot/update.sh @@ -1,9 +1,9 @@ #!/usr/bin/env bash # WARNING: THIS FILE IS MANAGED IN THE 'BOILERPLATE' REPO AND COPIED TO OTHER REPOSITORIES. -# ONLY EDIT THIS FILE FROM WITHIN THE 'LYFT/BOILERPLATE' REPOSITORY: +# ONLY EDIT THIS FILE FROM WITHIN THE 'FLYTEORG/BOILERPLATE' REPOSITORY: # -# TO OPT OUT OF UPDATES, SEE https://github.com/lyft/boilerplate/blob/master/Readme.rst +# TO OPT OUT OF UPDATES, SEE https://github.com/flyteorg/boilerplate/blob/master/Readme.rst set -e @@ -11,4 +11,5 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )" # Clone the config.yml file echo " - copying ${DIR}/config.yml to the root directory." -cp ${DIR}/config.yml ${DIR}/../../.github/config.yml +cp "${DIR}"/config.yml "${DIR}"/../../../.github/config.yml + diff --git a/boilerplate/update.cfg b/boilerplate/update.cfg index 90e8b6daac..e562c37130 100644 --- a/boilerplate/update.cfg +++ b/boilerplate/update.cfg @@ -1 +1,2 @@ -flyte/ +flyte/welcome_bot +flyte/code_of_conduct diff --git a/boilerplate/update.sh b/boilerplate/update.sh index 374e4b930e..73de4dc91c 100755 --- a/boilerplate/update.sh +++ b/boilerplate/update.sh @@ -1,23 +1,21 @@ #!/usr/bin/env bash # WARNING: THIS FILE IS MANAGED IN THE 'BOILERPLATE' REPO AND COPIED TO OTHER REPOSITORIES. -# ONLY EDIT THIS FILE FROM WITHIN THE 'LYFT/BOILERPLATE' REPOSITORY: +# ONLY EDIT THIS FILE FROM WITHIN THE 'FLYTEORG/BOILERPLATE' REPOSITORY: # -# TO OPT OUT OF UPDATES, SEE https://github.com/lyft/boilerplate/blob/master/Readme.rst +# TO OPT OUT OF UPDATES, SEE https://github.com/flyteorg/boilerplate/blob/master/Readme.rst set -e DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )" OUT="$(mktemp -d)" -trap "rm -fr $OUT" EXIT +trap 'rm -fr $OUT' EXIT -git clone git@github.com:flyteorg/boilerplate.git "${OUT}" +git clone https://github.com/flyteorg/boilerplate.git "${OUT}" echo "Updating the update.sh script." cp "${OUT}/boilerplate/update.sh" "${DIR}/update.sh" -echo "" - CONFIG_FILE="${DIR}/update.cfg" README="https://github.com/flyteorg/boilerplate/blob/master/Readme.rst" @@ -30,12 +28,12 @@ if [ ! -f "$CONFIG_FILE" ]; then fi if [ -z "$REPOSITORY" ]; then - echo '$REPOSITORY is required to run this script' + echo "$REPOSITORY is required to run this script" echo "See $README for more details." exit 1 fi -while read directory junk; do +while read -r directory junk; do # Skip comment lines (which can have leading whitespace) if [[ "$directory" == '#'* ]]; then continue @@ -63,8 +61,8 @@ while read directory junk; do echo "$directory is configured in update.cfg." echo "-----------------------------------------------------------------------------------" echo "syncing files from source." - rm -rf "${DIR}/${directory}" - mkdir -p $(dirname "${DIR}/${directory}") + rm -rf "${DIR:?}/${directory}" + mkdir -p "$(dirname "${DIR}"/"${directory}")" cp -r "$dir_path" "${DIR}/${directory}" if [ -f "${DIR}/${directory}/update.sh" ]; then echo "executing ${DIR}/${directory}/update.sh" @@ -72,4 +70,4 @@ while read directory junk; do fi echo "***********************************************************************************" echo "" -done < "$CONFIG_FILE" \ No newline at end of file +done < "$CONFIG_FILE"