Skip to content

Commit

Permalink
Update code of conduct (flyteorg#1258)
Browse files Browse the repository at this point in the history
Signed-off-by: Ketan Umare <[email protected]>
  • Loading branch information
samhita-alla authored Jul 29, 2021
1 parent bdef7b8 commit a7659a6
Show file tree
Hide file tree
Showing 10 changed files with 34 additions and 19 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ Chart.lock
.cr-index/
bin/-
bin/
.python-version-
.python-version
5 changes: 2 additions & 3 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -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.
2 changes: 2 additions & 0 deletions boilerplate/flyte/code_of_conduct/CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -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.
2 changes: 2 additions & 0 deletions boilerplate/flyte/code_of_conduct/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
CODE OF CONDUCT
~~~~~~~~~~~~~~~
12 changes: 12 additions & 0 deletions boilerplate/flyte/code_of_conduct/update.sh
Original file line number Diff line number Diff line change
@@ -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
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
#!/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 )"

# 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

3 changes: 2 additions & 1 deletion boilerplate/update.cfg
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
flyte/
flyte/welcome_bot
flyte/code_of_conduct
20 changes: 9 additions & 11 deletions boilerplate/update.sh
Original file line number Diff line number Diff line change
@@ -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"
Expand All @@ -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
Expand Down Expand Up @@ -63,13 +61,13 @@ 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"
"${DIR}/${directory}/update.sh"
fi
echo "***********************************************************************************"
echo ""
done < "$CONFIG_FILE"
done < "$CONFIG_FILE"

0 comments on commit a7659a6

Please sign in to comment.