Skip to content

Commit 0848d28

Browse files
authored
Merge pull request #49 from projectsyn/modulesync-c333493
[ModuleSync] Update from projectsyn/modulesync-control@c333493
2 parents d1bc6b4 + 74e7d26 commit 0848d28

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ docs-serve: ## Preview the documentation
4949
.PHONY: compile
5050
.compile:
5151
mkdir -p dependencies
52-
$(COMMODORE_CMD)
52+
$(COMPILE_CMD)
5353

5454
.PHONY: test
5555
test: commodore_args += -f tests/$(instance).yml

Makefile.vars.mk

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,14 @@ root_volume ?= -v "$${PWD}:/$(COMPONENT_NAME)"
1212
compiled_volume ?= -v "$${PWD}/$(compiled_path):/$(COMPONENT_NAME)"
1313
commodore_args ?= --search-paths ./dependencies --search-paths .
1414

15-
DOCKER_CMD ?= docker
16-
DOCKER_ARGS ?= run --rm -u "$$(id -u):$$(id -g)" -w /$(COMPONENT_NAME) -e HOME="/$(COMPONENT_NAME)"
15+
ifneq "$(shell which docker 2>/dev/null)" ""
16+
DOCKER_CMD ?= $(shell which docker)
17+
DOCKER_USERNS ?= ""
18+
else
19+
DOCKER_CMD ?= podman
20+
DOCKER_USERNS ?= keep-id
21+
endif
22+
DOCKER_ARGS ?= run --rm -u "$$(id -u):$$(id -g)" --userns=$(DOCKER_USERNS) -w /$(COMPONENT_NAME) -e HOME="/$(COMPONENT_NAME)"
1723

1824
JSONNET_FILES ?= $(shell find . -type f -not -path './vendor/*' \( -name '*.*jsonnet' -or -name '*.libsonnet' \))
1925
JSONNETFMT_ARGS ?= --in-place --pad-arrays
@@ -30,7 +36,8 @@ VALE_ARGS ?= --minAlertLevel=error --config=/pages/ROOT/pages/.vale.ini /pages
3036

3137
ANTORA_PREVIEW_CMD ?= $(DOCKER_CMD) run --rm --publish 35729:35729 --publish 2020:2020 --volume "${PWD}/.git":/preview/antora/.git --volume "${PWD}/docs":/preview/antora/docs docker.io/vshn/antora-preview:3.0.1.1 --style=syn --antora=docs
3238

33-
COMMODORE_CMD ?= $(DOCKER_CMD) $(DOCKER_ARGS) $(root_volume) docker.io/projectsyn/commodore:latest component compile . $(commodore_args)
39+
COMMODORE_CMD ?= $(DOCKER_CMD) $(DOCKER_ARGS) $(root_volume) docker.io/projectsyn/commodore:latest
40+
COMPILE_CMD ?= $(COMMODORE_CMD) component compile . $(commodore_args)
3441
JB_CMD ?= $(DOCKER_CMD) $(DOCKER_ARGS) --entrypoint /usr/local/bin/jb docker.io/projectsyn/commodore:latest install
3542

3643
instance ?= defaults

0 commit comments

Comments
 (0)