From 454e0391e8ce88feb827da744493dc7898bf73ba Mon Sep 17 00:00:00 2001 From: Eric Gallager Date: Wed, 6 Nov 2024 10:40:35 -0500 Subject: [PATCH 1/3] Remove map-diff stuff I am tired of trying to get it to work --- .github/workflows/map-diff.yml | 99 ---------------------------------- .gitmodules | 3 -- utils/wesnoth-map-diff | 1 - 3 files changed, 103 deletions(-) delete mode 100644 .github/workflows/map-diff.yml delete mode 160000 utils/wesnoth-map-diff diff --git a/.github/workflows/map-diff.yml b/.github/workflows/map-diff.yml deleted file mode 100644 index e02d9858..00000000 --- a/.github/workflows/map-diff.yml +++ /dev/null @@ -1,99 +0,0 @@ ---- -name: Map Diff - -on: - pull_request_target: - paths: - - '**.map' - -jobs: - comment-map-diff: - permissions: - pull-requests: write - continue-on-error: true - runs-on: ubuntu-20.04 - steps: - - name: Checkout repository - uses: actions/checkout@v4 - with: - submodules: "recursive" - - uses: actions/setup-node@v4 - with: - node-version: '16' - - name: Package install with npm - run: cd utils/wesnoth-map-diff && pwd && (npm install || stat package.json) - - name: Package build with npm - run: cd utils/wesnoth-map-diff && npm run build:prod - - name: Get maps diff - id: get-maps-diff - env: - SHA: ${{ github.event.pull_request.head.sha }} - run: | - sudo apt-get -y -q install pngquant - comment_body="" - log() { printf '\e[1m%s\e[m\n' "$*"; } # write log message in bold - - sync && log "in $(pwd): getting changed maps with SHA of ${SHA}" - git fetch origin - git checkout "$SHA" - cd utils/wesnoth-map-diff - sync && log "now in $(pwd), which ought to report being a submodule…" - git status - git fsck - git fetch - if test -x "$(which mapfile)"; then \ - sync && log "mapfile is '$(which mapfile)'"; \ - elif test -n "$(type mapfile 2>/dev/null)"; then \ - sync && log "about mapfile: '$(type mapfile)'"; \ - else \ - ls -al; \ - fi - mapfile -t map_paths < <(pushd ../.. && git diff --name-only HEAD "$SHA" | grep '\.map$' && popd) - - sync && log "Looping through map_paths next..." - for map_path in "${map_paths[@]}" - do - ## Get new map version - log "Check out $map_path from $SHA..." - new_map=${map_path##*/} - git show "$SHA":"$map_path" > "$new_map" - - log "Generate map diff image for $map_path..." - node build/index.js "../../$map_path" "$new_map" diff_image.png - identify diff_image.png - - log 'Compress image...' - pngquant --force --output diff_image.png diff_image.png - identify diff_image.png - - log 'Uploading diff_image.png...' - json=$(curl -s -F image=@diff_image.png https://api.imgur.com/3/upload | tee /dev/stderr) \ - || continue - - log 'Generating HTML comment...' - html=$(jq -r --arg path "$map_path" 'if .data.link != null - then @html "

\($path)


" - elif has("errors") then .errors[].status | halt_error - else "Unexpected JSON structure!\n" | halt_error end' <<< "$json") \ - || continue - comment_body+=$html - done - - if test -z "${comment_body}"; then - comment_body="ERR: map diff action failed to output valid comment!" - fi - - printf 'COMMENT_BODY=%s\n' "$comment_body" >> "$GITHUB_OUTPUT" - - name: Find comment - uses: peter-evans/find-comment@v3 - id: fc - with: - issue-number: ${{ github.event.pull_request.number }} - comment-author: 'github-actions[bot]' - - name: Add comment - uses: peter-evans/create-or-update-comment@v4 - with: - issue-number: ${{ github.event.pull_request.number }} - comment-id: ${{ steps.fc.outputs.comment-id }} - edit-mode: replace - body: ${{ steps.get-maps-diff.outputs.COMMENT_BODY }} diff --git a/.gitmodules b/.gitmodules index 25c03fab..e69de29b 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +0,0 @@ -[submodule "utils/wesnoth-map-diff"] - path = utils/wesnoth-map-diff - url = git@github.com:cooljeanius/wesnoth-map-diff.git diff --git a/utils/wesnoth-map-diff b/utils/wesnoth-map-diff deleted file mode 160000 index 90bcdb32..00000000 --- a/utils/wesnoth-map-diff +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 90bcdb32c3d704a9b3b199504365eb77201649f3 From 88b4561758bcd4df1e99fd68188f8c233521c38d Mon Sep 17 00:00:00 2001 From: Eric Gallager Date: Wed, 6 Nov 2024 10:55:12 -0500 Subject: [PATCH 2/3] Remove gitsubmodule updates since I removed the submodule --- .github/dependabot.yml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 1f54da83..eeb59a0f 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -6,13 +6,7 @@ version: 2 updates: - - package-ecosystem: "gitsubmodule" # See documentation for possible values - directory: "/" # Location of package manifests - schedule: - interval: "weekly" - day: "tuesday" - package-ecosystem: "github-actions" directory: "/" schedule: interval: "weekly" - day: "tuesday" From b94e7b3593a4e388283036d9fe5074f9036b193d Mon Sep 17 00:00:00 2001 From: Eric Gallager Date: Wed, 6 Nov 2024 10:58:31 -0500 Subject: [PATCH 3/3] Delete .gitmodules --- .gitmodules | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 .gitmodules diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index e69de29b..00000000