Skip to content

Commit

Permalink
remove custom add_license.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcelKoch committed Nov 17, 2023
1 parent 88a7806 commit 802a3da
Show file tree
Hide file tree
Showing 7 changed files with 4 additions and 92 deletions.
3 changes: 1 addition & 2 deletions .github/bot-pr-format-base.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,12 @@ git config user.name "ginkgo-bot"

# save scripts from develop
pushd dev_tools/scripts || exit 1
cp add_license.sh update-ginkgo-header.py /tmp
cp update-ginkgo-header.py /tmp
popd || exit 1

# checkout current PR head
LOCAL_BRANCH=format-tmp-$HEAD_BRANCH
git checkout -b $LOCAL_BRANCH fork/$HEAD_BRANCH

# restore files from develop
cp /tmp/add_license.sh dev_tools/scripts/
cp /tmp/update-ginkgo-header.py dev_tools/scripts/
2 changes: 1 addition & 1 deletion .github/check-format.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ pipx run pre-commit run --show-diff-on-failure --color=always --from-ref "origin

echo -n "Collecting information on changed files"

git checkout -- dev_tools/scripts/*.sh dev_tools/scripts/update-ginkgo-header.py
git checkout -- dev_tools/scripts/update-ginkgo-header.py

# check for changed files, replace newlines by \n
LIST_FILES=$(git diff --name-only | sed '$!s/$/\\n/' | tr -d '\n')
Expand Down
3 changes: 1 addition & 2 deletions .github/format-rebase.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ DIFF_COMMAND="git diff --name-only --no-renames --diff-filter=AM HEAD~ | grep -E

# do the formatting rebase
git rebase --rebase-merges --empty=drop --no-keep-empty \
--exec "cp /tmp/add_license.sh /tmp/update-ginkgo-header.py dev_tools/scripts/ && \
dev_tools/scripts/add_license.sh && \
--exec "cp /tmp/update-ginkgo-header.py dev_tools/scripts/ && \
pipx run pre-commit run && \
git checkout dev_tools/scripts && (git diff >> /tmp/difflog; true) && (git diff --quiet || git commit -a --amend --no-edit --allow-empty)" \
base/$BASE_BRANCH 2>&1 || bot_error "Rebase failed, see the related [Action]($JOB_URL) for details"
Expand Down
3 changes: 1 addition & 2 deletions .github/format.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,10 @@ echo "PR has ${NUM} changed files"
TO_FORMAT="$(echo "$PR_FILES" | grep -E $EXTENSION_REGEX || true)"

# format files
dev_tools/scripts/add_license.sh
pipx run pre-commit run --files $TO_FORMAT || true

# restore formatting scripts so they don't appear in the diff
git checkout -- dev_tools/scripts/*.sh dev_tools/scripts/update-ginkgo-header.py
git checkout -- dev_tools/scripts/update-ginkgo-header.py

# check for changed files, replace newlines by \n
CHANGES=$(git diff --name-only | sed '$!s/$/\\n/' | tr -d '\n')
Expand Down
5 changes: 0 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -377,11 +377,6 @@ if(GINKGO_DEVEL_TOOLS)
COMMAND bash -c "${PRE_COMMIT} run"
WORKING_DIRECTORY ${Ginkgo_SOURCE_DIR}
VERBATIM)

add_custom_target(add_license
COMMAND ${Ginkgo_SOURCE_DIR}/dev_tools/scripts/add_license.sh
WORKING_DIRECTORY ${Ginkgo_SOURCE_DIR})
add_dependencies(format add_license)
endif()

# MacOS needs to install bash, gnu-sed, findutils and coreutils
Expand Down
3 changes: 0 additions & 3 deletions dev_tools/scripts/add_license.ignore

This file was deleted.

77 changes: 0 additions & 77 deletions dev_tools/scripts/add_license.sh

This file was deleted.

0 comments on commit 802a3da

Please sign in to comment.