From 56d2f99548c70569aa2debe48254bed187e307b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Dunglas?= Date: Mon, 7 Oct 2024 13:36:27 +0200 Subject: [PATCH] chore: make the watcher module internal --- Dockerfile | 1 - alpine.Dockerfile | 1 - {watcher => internal/watcher}/watch_pattern.go | 0 {watcher => internal/watcher}/watch_pattern_test.go | 0 {watcher => internal/watcher}/watcher-c.h | 0 {watcher => internal/watcher}/watcher.c | 0 {watcher => internal/watcher}/watcher.go | 0 {watcher => internal/watcher}/watcher.h | 0 static-builder.Dockerfile | 6 +++--- worker.go | 2 +- 10 files changed, 4 insertions(+), 6 deletions(-) rename {watcher => internal/watcher}/watch_pattern.go (100%) rename {watcher => internal/watcher}/watch_pattern_test.go (100%) rename {watcher => internal/watcher}/watcher-c.h (100%) rename {watcher => internal/watcher}/watcher.c (100%) rename {watcher => internal/watcher}/watcher.go (100%) rename {watcher => internal/watcher}/watcher.h (100%) diff --git a/Dockerfile b/Dockerfile index ad3ce0212..a92104d8b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -85,7 +85,6 @@ COPY --link *.* ./ COPY --link caddy caddy COPY --link internal internal COPY --link testdata testdata -COPY --link watcher watcher # install edant/watcher (necessary for file watching) ARG EDANT_WATCHER_VERSION=next diff --git a/alpine.Dockerfile b/alpine.Dockerfile index 445078236..81f5bf7da 100644 --- a/alpine.Dockerfile +++ b/alpine.Dockerfile @@ -106,7 +106,6 @@ COPY --link *.* ./ COPY --link caddy caddy COPY --link internal internal COPY --link testdata testdata -COPY --link watcher watcher # install edant/watcher (necessary for file watching) ARG EDANT_WATCHER_VERSION=next diff --git a/watcher/watch_pattern.go b/internal/watcher/watch_pattern.go similarity index 100% rename from watcher/watch_pattern.go rename to internal/watcher/watch_pattern.go diff --git a/watcher/watch_pattern_test.go b/internal/watcher/watch_pattern_test.go similarity index 100% rename from watcher/watch_pattern_test.go rename to internal/watcher/watch_pattern_test.go diff --git a/watcher/watcher-c.h b/internal/watcher/watcher-c.h similarity index 100% rename from watcher/watcher-c.h rename to internal/watcher/watcher-c.h diff --git a/watcher/watcher.c b/internal/watcher/watcher.c similarity index 100% rename from watcher/watcher.c rename to internal/watcher/watcher.c diff --git a/watcher/watcher.go b/internal/watcher/watcher.go similarity index 100% rename from watcher/watcher.go rename to internal/watcher/watcher.go diff --git a/watcher/watcher.h b/internal/watcher/watcher.h similarity index 100% rename from watcher/watcher.h rename to internal/watcher/watcher.h diff --git a/static-builder.Dockerfile b/static-builder.Dockerfile index 42120ff09..92744cd75 100644 --- a/static-builder.Dockerfile +++ b/static-builder.Dockerfile @@ -104,9 +104,9 @@ COPY caddy/go.mod caddy/go.sum ./ RUN go mod graph | awk '{if ($1 !~ "@") print $2}' | xargs go get WORKDIR /go/src/app -COPY *.* ./ -COPY caddy caddy -COPY watcher watcher +COPY --link *.* ./ +COPY --link caddy caddy +COPY --link internal/watcher internal/watcher RUN --mount=type=secret,id=github-token GITHUB_TOKEN=$(cat /run/secrets/github-token) ./build-static.sh && \ rm -Rf dist/static-php-cli/source/* diff --git a/worker.go b/worker.go index bce902d0c..f1c34be94 100644 --- a/worker.go +++ b/worker.go @@ -13,7 +13,7 @@ import ( "sync/atomic" "time" - "github.com/dunglas/frankenphp/watcher" + "github.com/dunglas/frankenphp/internal/watcher" "go.uber.org/zap" "go.uber.org/zap/zapcore" )