From 4fcf18857e196f1b2790854578b7b6e6a98113b8 Mon Sep 17 00:00:00 2001 From: jinnrry Date: Fri, 1 Mar 2024 20:37:17 +0800 Subject: [PATCH 01/10] fix --- .github/workflows/release.yml | 1 + Dockerfile | 8 ++++---- DockerfileGithubAction | 6 +++--- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7d01f4f7..9e9ccd53 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -57,6 +57,7 @@ jobs: go build -ldflags "-s -w" -o ${{ env.TGFILENAME }} hooks/telegram_push/telegram_push.go go build -ldflags "-s -w" -o ${{ env.WEBFILENAME }} hooks/web_push/web_push.go go build -ldflags "-s -w" -o ${{ env.WCFILENAME }} hooks/wechat_push/wechat_push.go + ls -alh - name: Upload files to Artifacts uses: actions/upload-artifact@v3 with: diff --git a/Dockerfile b/Dockerfile index 508ec75e..57259fe9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,10 +14,10 @@ COPY server . COPY --from=febuild /work/dist /work/http_server/dist RUN apk update && apk add git -RUN go build -ldflags "-X 'main.goVersion=$(go version)' -X 'main.gitHash=$(git show -s --format=%H)' -X 'main.buildTime=$(TZ=UTC-8 date +%Y-%m-%d" "%H:%M:%S)'" -o pmail main.go -RUN cd /work/hooks/telegram_push && go build -ldflags "-s -W" -o output/telegram_push main.go -RUN cd /work/hooks/web_push && go build -ldflags "-s -W" -o output/web_push main.go -RUN cd /work/hooks/wechat_push && go build -ldflags "-s -W" -o output/wechat_push main.go +RUN go build -ldflags "-s -w -X 'main.goVersion=$(go version)' -X 'main.gitHash=$(git show -s --format=%H)' -X 'main.buildTime=$(TZ=UTC-8 date +%Y-%m-%d" "%H:%M:%S)'" -o pmail main.go +RUN cd /work/hooks/telegram_push && go build -ldflags "-s -w" -o output/telegram_push main.go +RUN cd /work/hooks/web_push && go build -ldflags "-s -w" -o output/web_push main.go +RUN cd /work/hooks/wechat_push && go build -ldflags "-s -w" -o output/wechat_push main.go FROM alpine diff --git a/DockerfileGithubAction b/DockerfileGithubAction index 3562eecc..6a3b5f94 100644 --- a/DockerfileGithubAction +++ b/DockerfileGithubAction @@ -6,9 +6,9 @@ COPY server . RUN apk update && apk add git RUN go build -ldflags "-s -w -X 'main.goVersion=$(go version)' -X 'main.gitHash=$(git show -s --format=%H)' -X 'main.buildTime=$(TZ=UTC-8 date +%Y-%m-%d" "%H:%M:%S)'" -o pmail main.go -RUN cd /work/hooks/telegram_push && go build -ldflags "-s -W" -o output/telegram_push telegram_push.go -RUN cd /work/hooks/web_push && go build -ldflags "-s -W" -o output/web_push web_push.go -RUN cd /work/hooks/wechat_push && go build -ldflags "-s -W" -o output/wechat_push wechat_push.go +RUN cd /work/hooks/telegram_push && go build -ldflags "-s -w" -o output/telegram_push telegram_push.go +RUN cd /work/hooks/web_push && go build -ldflags "-s -w" -o output/web_push web_push.go +RUN cd /work/hooks/wechat_push && go build -ldflags "-s -w" -o output/wechat_push wechat_push.go FROM alpine From 9109826b22f4afea801334178c85c22c2f2d775c Mon Sep 17 00:00:00 2001 From: jinnrry Date: Fri, 1 Mar 2024 20:46:25 +0800 Subject: [PATCH 02/10] fix --- .github/workflows/release.yml | 72 ++++++++++++++++++++++------------- 1 file changed, 45 insertions(+), 27 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9e9ccd53..253802de 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -3,22 +3,22 @@ name: Build and Release on: workflow_dispatch: release: - types: [released,prereleased] + types: [ released,prereleased ] + - jobs: build: permissions: contents: write strategy: matrix: - goos: [windows, linux, darwin] - goarch: [amd64, arm64] + goos: [ windows, linux, darwin ] + goarch: [ amd64, arm64 ] runs-on: ubuntu-latest - env: - CGO_ENABLED: 0 - GOOS: ${{ matrix.goos }} - GOARCH: ${{ matrix.goarch }} + env: + CGO_ENABLED: 0 + GOOS: ${{ matrix.goos }} + GOARCH: ${{ matrix.goarch }} steps: - name: Get version id: get_version @@ -37,27 +37,27 @@ jobs: check-latest: true - name: Gen output name run: | - echo "FILENAME=pmail_${{ matrix.goos }}_${{ matrix.goarch }}" >> ${GITHUB_ENV} - echo "TGFILENAME=telegram_push_${{ matrix.goos }}_${{ matrix.goarch }}" >> ${GITHUB_ENV} - echo "WCFILENAME=wechat_push_${{ matrix.goos }}_${{ matrix.goarch }}" >> ${GITHUB_ENV} - echo "WEBFILENAME=web_push_${{ matrix.goos }}_${{ matrix.goarch }}" >> ${GITHUB_ENV} + echo "FILENAME=pmail_${{ matrix.goos }}_${{ matrix.goarch }}" >> ${GITHUB_ENV} + echo "TGFILENAME=telegram_push_${{ matrix.goos }}_${{ matrix.goarch }}" >> ${GITHUB_ENV} + echo "WCFILENAME=wechat_push_${{ matrix.goos }}_${{ matrix.goarch }}" >> ${GITHUB_ENV} + echo "WEBFILENAME=web_push_${{ matrix.goos }}_${{ matrix.goarch }}" >> ${GITHUB_ENV} - name: Rename Windows File if: matrix.goos == 'windows' run: | - echo "FILENAME=pmail_${{ matrix.goos }}_${{ matrix.goarch }}.exe" >> ${GITHUB_ENV} - echo "TGFILENAME=telegram_push_${{ matrix.goos }}_${{ matrix.goarch }}.exe" >> ${GITHUB_ENV} - echo "WCFILENAME=wechat_push_${{ matrix.goos }}_${{ matrix.goarch }}.exe" >> ${GITHUB_ENV} - echo "WEBFILENAME=web_push_${{ matrix.goos }}_${{ matrix.goarch }}.exe" >> ${GITHUB_ENV} + echo "FILENAME=pmail_${{ matrix.goos }}_${{ matrix.goarch }}.exe" >> ${GITHUB_ENV} + echo "TGFILENAME=telegram_push_${{ matrix.goos }}_${{ matrix.goarch }}.exe" >> ${GITHUB_ENV} + echo "WCFILENAME=wechat_push_${{ matrix.goos }}_${{ matrix.goarch }}.exe" >> ${GITHUB_ENV} + echo "WEBFILENAME=web_push_${{ matrix.goos }}_${{ matrix.goarch }}.exe" >> ${GITHUB_ENV} - name: FE Build run: cd fe && yarn && yarn build - name: BE Build run: | - cd server && cp -rf ../fe/dist http_server - go build -ldflags "-s -w -X 'main.version=${{ env.VERSION }}' -X 'main.goVersion=$(go version)' -X 'main.gitHash=$(git show -s --format=%H)' -X 'main.buildTime=$(TZ=UTC-8 date +%Y-%m-%d" "%H:%M:%S)'" -o ${{ env.FILENAME }} main.go - go build -ldflags "-s -w" -o ${{ env.TGFILENAME }} hooks/telegram_push/telegram_push.go - go build -ldflags "-s -w" -o ${{ env.WEBFILENAME }} hooks/web_push/web_push.go - go build -ldflags "-s -w" -o ${{ env.WCFILENAME }} hooks/wechat_push/wechat_push.go - ls -alh + cd server && cp -rf ../fe/dist http_server + go build -ldflags "-s -w -X 'main.version=${{ env.VERSION }}' -X 'main.goVersion=$(go version)' -X 'main.gitHash=$(git show -s --format=%H)' -X 'main.buildTime=$(TZ=UTC-8 date +%Y-%m-%d" "%H:%M:%S)'" -o ${{ env.FILENAME }} main.go + go build -ldflags "-s -w" -o ${{ env.TGFILENAME }} hooks/telegram_push/telegram_push.go + go build -ldflags "-s -w" -o ${{ env.WEBFILENAME }} hooks/web_push/web_push.go + go build -ldflags "-s -w" -o ${{ env.WCFILENAME }} hooks/wechat_push/wechat_push.go + ls -alh - name: Upload files to Artifacts uses: actions/upload-artifact@v3 with: @@ -71,10 +71,28 @@ jobs: uses: svenstaro/upload-release-action@v2 with: repo_token: ${{ secrets.GITHUB_TOKEN }} - file: | - ./server/${{ env.FILENAME }} - ./server/${{ env.TGFILENAME }} - ./server/${{ env.WEBFILENAME }} - ./server/${{ env.WCFILENAME }} + file: ./server/${{ env.FILENAME }} tag: ${{ github.ref }} file_glob: true + - name: Upload binaries to release + uses: svenstaro/upload-release-action@v2 + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + file: + ./server/${{ env.TGFILENAME }} + tag: ${{ github.ref }} + file_glob: true + - name: Upload binaries to release + uses: svenstaro/upload-release-action@v2 + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + file: ./server/${{ env.WEBFILENAME }} + tag: ${{ github.ref }} + file_glob: true + - name: Upload binaries to release + uses: svenstaro/upload-release-action@v2 + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + file: ./server/${{ env.WCFILENAME }} + tag: ${{ github.ref }} + file_glob: true \ No newline at end of file From a4fce308579f018e1df80ea05f4b9f3372933c6c Mon Sep 17 00:00:00 2001 From: jinnrry Date: Fri, 1 Mar 2024 20:57:37 +0800 Subject: [PATCH 03/10] fix --- .github/workflows/release.yml | 35 +++++++---------------------------- 1 file changed, 7 insertions(+), 28 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 253802de..790f2fcd 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -41,6 +41,7 @@ jobs: echo "TGFILENAME=telegram_push_${{ matrix.goos }}_${{ matrix.goarch }}" >> ${GITHUB_ENV} echo "WCFILENAME=wechat_push_${{ matrix.goos }}_${{ matrix.goarch }}" >> ${GITHUB_ENV} echo "WEBFILENAME=web_push_${{ matrix.goos }}_${{ matrix.goarch }}" >> ${GITHUB_ENV} + echo "ZIPNAME=${{ matrix.goos }}_${{ matrix.goarch }}" >> ${GITHUB_ENV} - name: Rename Windows File if: matrix.goos == 'windows' run: | @@ -58,41 +59,19 @@ jobs: go build -ldflags "-s -w" -o ${{ env.WEBFILENAME }} hooks/web_push/web_push.go go build -ldflags "-s -w" -o ${{ env.WCFILENAME }} hooks/wechat_push/wechat_push.go ls -alh + - name: Zip + uses: montudor/action-zip@v1 + with: + args: zip -qq -r ${{ env.ZIPNAME }}.zip ./server/${{ env.FILENAME }} ./server/${{ env.TGFILENAME }} ./server/${{ env.WEBFILENAME }} ./server/${{ env.WCFILENAME }} - name: Upload files to Artifacts uses: actions/upload-artifact@v3 with: name: ${{ env.FILENAME }} - path: | - ./server/${{ env.FILENAME }} - ./server/${{ env.TGFILENAME }} - ./server/${{ env.WEBFILENAME }} - ./server/${{ env.WCFILENAME }} + path: ${{ env.FILENAME }}.zip - name: Upload binaries to release uses: svenstaro/upload-release-action@v2 with: repo_token: ${{ secrets.GITHUB_TOKEN }} - file: ./server/${{ env.FILENAME }} - tag: ${{ github.ref }} - file_glob: true - - name: Upload binaries to release - uses: svenstaro/upload-release-action@v2 - with: - repo_token: ${{ secrets.GITHUB_TOKEN }} - file: - ./server/${{ env.TGFILENAME }} - tag: ${{ github.ref }} - file_glob: true - - name: Upload binaries to release - uses: svenstaro/upload-release-action@v2 - with: - repo_token: ${{ secrets.GITHUB_TOKEN }} - file: ./server/${{ env.WEBFILENAME }} - tag: ${{ github.ref }} - file_glob: true - - name: Upload binaries to release - uses: svenstaro/upload-release-action@v2 - with: - repo_token: ${{ secrets.GITHUB_TOKEN }} - file: ./server/${{ env.WCFILENAME }} + file: ${{ env.FILENAME }}.zip tag: ${{ github.ref }} file_glob: true \ No newline at end of file From 4f150fbf184c721999eed308adab060f96efbb62 Mon Sep 17 00:00:00 2001 From: jinnrry Date: Fri, 1 Mar 2024 21:27:02 +0800 Subject: [PATCH 04/10] fix --- .github/workflows/docker_build_pre.yml | 1 + DockerfileGithubAction | 10 +++++----- server/config/config.go | 2 -- server/main.go | 4 ++++ 4 files changed, 10 insertions(+), 7 deletions(-) diff --git a/.github/workflows/docker_build_pre.yml b/.github/workflows/docker_build_pre.yml index da1e6b38..21799d59 100644 --- a/.github/workflows/docker_build_pre.yml +++ b/.github/workflows/docker_build_pre.yml @@ -51,6 +51,7 @@ jobs: - name: Build and push Docker images uses: docker/build-push-action@v4 with: + build-args: VERSION=${{ env.VERSION }} context: . file: ./DockerfileGithubAction platforms: | diff --git a/DockerfileGithubAction b/DockerfileGithubAction index 6a3b5f94..3150d014 100644 --- a/DockerfileGithubAction +++ b/DockerfileGithubAction @@ -1,11 +1,11 @@ FROM golang:alpine as serverbuild - +ARG VERSION WORKDIR /work COPY server . RUN apk update && apk add git -RUN go build -ldflags "-s -w -X 'main.goVersion=$(go version)' -X 'main.gitHash=$(git show -s --format=%H)' -X 'main.buildTime=$(TZ=UTC-8 date +%Y-%m-%d" "%H:%M:%S)'" -o pmail main.go +RUN go build -ldflags "-s -w -X 'main.version=${VERSION}' -X 'main.goVersion=$(go version)' -X 'main.gitHash=$(git show -s --format=%H)' -X 'main.buildTime=$(TZ=UTC-8 date +%Y-%m-%d" "%H:%M:%S)'" -o pmail main.go RUN cd /work/hooks/telegram_push && go build -ldflags "-s -w" -o output/telegram_push telegram_push.go RUN cd /work/hooks/web_push && go build -ldflags "-s -w" -o output/web_push web_push.go RUN cd /work/hooks/wechat_push && go build -ldflags "-s -w" -o output/wechat_push wechat_push.go @@ -24,8 +24,8 @@ RUN apk add --no-cache tzdata \ COPY --from=serverbuild /work/pmail . -COPY --from=serverbuild /work/hooks/telegram_push/output/* ./plugin/ -COPY --from=serverbuild /work/hooks/web_push/output/* ./plugin/ -COPY --from=serverbuild /work/hooks/wechat_push/output/* ./plugin/ +COPY --from=serverbuild /work/hooks/telegram_push/output/* ./plugins/ +COPY --from=serverbuild /work/hooks/web_push/output/* ./plugins/ +COPY --from=serverbuild /work/hooks/wechat_push/output/* ./plugins/ CMD /work/pmail diff --git a/server/config/config.go b/server/config/config.go index 704e9916..42984411 100644 --- a/server/config/config.go +++ b/server/config/config.go @@ -41,8 +41,6 @@ type Config struct { //go:embed tables/* var tableConfig embed.FS -const Version = "2.4.0" - const DBTypeMySQL = "mysql" const DBTypeSQLite = "sqlite" const SSLTypeAuto = "0" //自动生成证书 diff --git a/server/main.go b/server/main.go index 569f7f90..8a2edefe 100644 --- a/server/main.go +++ b/server/main.go @@ -74,6 +74,10 @@ func main() { log.SetLevel(log.InfoLevel) } + if version == "" { + version = "2.4.0" + } + log.Infoln("***************************************************") log.Infof("***\tServer Start Success Version:%s\n", version) log.Infof("***\tGit Commit Hash: %s ", gitHash) From 19ca49e6f66214a2680ccf93451983ef54c1010e Mon Sep 17 00:00:00 2001 From: jinnrry Date: Fri, 1 Mar 2024 21:30:51 +0800 Subject: [PATCH 05/10] test --- .github/workflows/release.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 790f2fcd..27bb2059 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -61,6 +61,7 @@ jobs: ls -alh - name: Zip uses: montudor/action-zip@v1 + run: ls with: args: zip -qq -r ${{ env.ZIPNAME }}.zip ./server/${{ env.FILENAME }} ./server/${{ env.TGFILENAME }} ./server/${{ env.WEBFILENAME }} ./server/${{ env.WCFILENAME }} - name: Upload files to Artifacts From eb96764e9cfc978b759fac2241d4fc53ef71172f Mon Sep 17 00:00:00 2001 From: jinnrry Date: Fri, 1 Mar 2024 21:32:13 +0800 Subject: [PATCH 06/10] test --- .github/workflows/release.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 27bb2059..494f9226 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -61,7 +61,9 @@ jobs: ls -alh - name: Zip uses: montudor/action-zip@v1 - run: ls + run: | + ls + ls ./server with: args: zip -qq -r ${{ env.ZIPNAME }}.zip ./server/${{ env.FILENAME }} ./server/${{ env.TGFILENAME }} ./server/${{ env.WEBFILENAME }} ./server/${{ env.WCFILENAME }} - name: Upload files to Artifacts From e68363659c5155ddf0b8ad392eff800abba837e5 Mon Sep 17 00:00:00 2001 From: jinnrry Date: Fri, 1 Mar 2024 21:37:29 +0800 Subject: [PATCH 07/10] test --- .github/workflows/release.yml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 494f9226..9980787e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -60,12 +60,10 @@ jobs: go build -ldflags "-s -w" -o ${{ env.WCFILENAME }} hooks/wechat_push/wechat_push.go ls -alh - name: Zip - uses: montudor/action-zip@v1 - run: | + run: | ls - ls ./server - with: - args: zip -qq -r ${{ env.ZIPNAME }}.zip ./server/${{ env.FILENAME }} ./server/${{ env.TGFILENAME }} ./server/${{ env.WEBFILENAME }} ./server/${{ env.WCFILENAME }} + ls /server + zip ${{ env.ZIPNAME }}.zip ./server/${{ env.FILENAME }} ./server/${{ env.TGFILENAME }} ./server/${{ env.WEBFILENAME }} ./server/${{ env.WCFILENAME }} - name: Upload files to Artifacts uses: actions/upload-artifact@v3 with: From 0780aadf5fe48dc18d9629e40c2261880a36e060 Mon Sep 17 00:00:00 2001 From: jinnrry Date: Fri, 1 Mar 2024 21:39:51 +0800 Subject: [PATCH 08/10] test --- .github/workflows/release.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9980787e..1b40ec0a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -61,8 +61,7 @@ jobs: ls -alh - name: Zip run: | - ls - ls /server + ls ./server zip ${{ env.ZIPNAME }}.zip ./server/${{ env.FILENAME }} ./server/${{ env.TGFILENAME }} ./server/${{ env.WEBFILENAME }} ./server/${{ env.WCFILENAME }} - name: Upload files to Artifacts uses: actions/upload-artifact@v3 From e1829bdc56efb1220b73e570309df23fbe2c4cfa Mon Sep 17 00:00:00 2001 From: jinnrry Date: Fri, 1 Mar 2024 21:43:10 +0800 Subject: [PATCH 09/10] fix --- .github/workflows/release.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1b40ec0a..0e3911d1 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -63,15 +63,17 @@ jobs: run: | ls ./server zip ${{ env.ZIPNAME }}.zip ./server/${{ env.FILENAME }} ./server/${{ env.TGFILENAME }} ./server/${{ env.WEBFILENAME }} ./server/${{ env.WCFILENAME }} + ls + ls ./server - name: Upload files to Artifacts uses: actions/upload-artifact@v3 with: - name: ${{ env.FILENAME }} - path: ${{ env.FILENAME }}.zip + name: ${{ env.ZIPNAME }} + path: ${{ env.ZIPNAME }}.zip - name: Upload binaries to release uses: svenstaro/upload-release-action@v2 with: repo_token: ${{ secrets.GITHUB_TOKEN }} - file: ${{ env.FILENAME }}.zip + file: ${{ env.ZIPNAME }}.zip tag: ${{ github.ref }} file_glob: true \ No newline at end of file From 956e836e51377263f3aabb9a2a49e8caf552ead9 Mon Sep 17 00:00:00 2001 From: jinnrry Date: Fri, 1 Mar 2024 21:50:13 +0800 Subject: [PATCH 10/10] fix --- .github/workflows/release.yml | 13 ++++++++----- server/hooks/base.go | 2 +- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0e3911d1..320e6dfe 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -61,19 +61,22 @@ jobs: ls -alh - name: Zip run: | - ls ./server - zip ${{ env.ZIPNAME }}.zip ./server/${{ env.FILENAME }} ./server/${{ env.TGFILENAME }} ./server/${{ env.WEBFILENAME }} ./server/${{ env.WCFILENAME }} + cd ./server + mkdir plugins + mv ${{ env.TGFILENAME }} plugins/ + mv ${{ env.WEBFILENAME }} plugins/ + mv ${{ env.WCFILENAME }} plugins/ + zip -r ${{ env.ZIPNAME }}.zip ${{ env.FILENAME }} plugins ls - ls ./server - name: Upload files to Artifacts uses: actions/upload-artifact@v3 with: name: ${{ env.ZIPNAME }} - path: ${{ env.ZIPNAME }}.zip + path: server/${{ env.ZIPNAME }}.zip - name: Upload binaries to release uses: svenstaro/upload-release-action@v2 with: repo_token: ${{ secrets.GITHUB_TOKEN }} - file: ${{ env.ZIPNAME }}.zip + file: server/${{ env.ZIPNAME }}.zip tag: ${{ github.ref }} file_glob: true \ No newline at end of file diff --git a/server/hooks/base.go b/server/hooks/base.go index 2aa68e21..08dd6268 100644 --- a/server/hooks/base.go +++ b/server/hooks/base.go @@ -142,7 +142,7 @@ func Init() { pluginNo := 1 filepath.Walk(root, func(path string, info os.FileInfo, err error) error { - if info != nil && !info.IsDir() && !strings.Contains(info.Name(), ".") { + if info != nil && !info.IsDir() && (!strings.Contains(info.Name(), ".") || strings.Contains(info.Name(), ".exe")) { socketPath := fmt.Sprintf("%s/%d.socket", root, pluginNo)