Skip to content

Commit

Permalink
Fix site-server Makefile rule to add workdir to Git safe directories
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremylvln committed Nov 14, 2023
1 parent 8b8a74e commit 2e2ca45
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions build/includes/website.mk
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ GID := $(shell id -g)
site-server: ARGS ?=-F
site-server: ENV ?= RELEASE_VERSION="$(base_version)" RELEASE_BRANCH=main
site-server: ensure-build-image
docker run --user $(UID):$(GID) --rm $(common_mounts) --workdir=$(mount_path)/site $(DOCKER_RUN_ARGS) -p 1313:1313 $(build_tag) bash -c \
"$(ENV) hugo server --watch --baseURL=http://localhost:1313/ --bind=0.0.0.0 $(ARGS)"
docker run --rm $(common_mounts) --workdir=$(mount_path)/site $(DOCKER_RUN_ARGS) -p 1313:1313 $(build_tag) bash -c \
"git config --global --add safe.directory /go/src/agones.dev/agones && $(ENV) hugo server --watch --baseURL=http://localhost:1313/ --bind=0.0.0.0 $(ARGS)"

site-static: ensure-build-image
-docker run --rm $(common_mounts) --workdir=$(mount_path)/site $(DOCKER_RUN_ARGS) $(build_tag) rm -r ./public
Expand All @@ -44,7 +44,7 @@ site-static: ensure-build-image
docker run --rm $(common_mounts) --workdir=$(mount_path)/site $(DOCKER_RUN_ARGS) $(build_tag) \
bash -c "npm list autoprefixer || npm install [email protected]"
docker run --rm $(common_mounts) --workdir=$(mount_path)/site $(DOCKER_RUN_ARGS) $(build_tag) bash -c \
"git config --global --add safe.directory /go/src/agones.dev/agones && $(ENV) hugo --config=config.toml $(ARGS)"
"git config --global --add safe.directory /go/src/agones.dev/agones && $(ENV) hugo --config=config.toml $(ARGS)"

site-gen-app-yaml: SERVICE ?= default
site-gen-app-yaml:
Expand Down

0 comments on commit 2e2ca45

Please sign in to comment.