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 24, 2023
1 parent e50dcbf commit b351be9
Show file tree
Hide file tree
Showing 7 changed files with 5 additions and 90 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,14 +14,13 @@ git config user.name "ginkgo-bot"

# save scripts from develop
pushd dev_tools/scripts || exit 1
cp add_license.sh format_header.sh update_ginkgo_header.sh /tmp
cp format_header.sh update_ginkgo_header.sh /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/format_header.sh dev_tools/scripts/
cp /tmp/update_ginkgo_header.sh dev_tools/scripts/
2 changes: 2 additions & 0 deletions .github/check-format.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ 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

# check for changed files, replace newlines by \n
LIST_FILES=$(git diff --name-only | sed '$!s/$/\\n/' | tr -d '\n')
echo -n .
Expand Down
4 changes: 2 additions & 2 deletions .github/format-rebase.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ 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/format_header.sh /tmp/update_ginkgo_header.sh dev_tools/scripts/ && \
dev_tools/scripts/add_license.sh && dev_tools/scripts/update_ginkgo_header.sh && \
--exec "cp /tmp/format_header.sh /tmp/update_ginkgo_header.sh dev_tools/scripts/ && \
dev_tools/scripts/update_ginkgo_header.sh && \
for f in \$($DIFF_COMMAND | grep -E '$FORMAT_HEADER_REGEX'); do dev_tools/scripts/format_header.sh \$f; done && \
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)" \
Expand Down
1 change: 0 additions & 1 deletion .github/format.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ echo "PR has ${NUM} changed files"
TO_FORMAT="$(echo "$PR_FILES" | grep -E $EXTENSION_REGEX || true)"

# format files
dev_tools/scripts/add_license.sh
dev_tools/scripts/update_ginkgo_header.sh
for f in $(echo "$TO_FORMAT" | grep -E $FORMAT_HEADER_REGEX); do dev_tools/scripts/format_header.sh "$f"; done
pipx run pre-commit run --files $TO_FORMAT || true
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 b351be9

Please sign in to comment.