Skip to content

Commit

Permalink
Delegate indexing to the Makefile
Browse files Browse the repository at this point in the history
Signed-off-by: Juan Cruz Viotti <[email protected]>
  • Loading branch information
jviotti committed Jan 29, 2025
1 parent 1586742 commit cd3eab6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
3 changes: 1 addition & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ RUN apt-get --yes update && apt-get install --yes --no-install-recommends make
COPY configuration.json /app/configuration.json
COPY vendor /app/vendor
COPY Makefile /app/Makefile
RUN make -C /app prepare REGISTRY=/usr/bin
RUN sourcemeta-registry-index /app/configuration.json /app/index
RUN make -C /app prepare index REGISTRY=/usr/bin OUTPUT=/app/index

FROM scratch
COPY --from=builder /usr/bin/sourcemeta-registry-server \
Expand Down
9 changes: 4 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,17 @@ LDD ?= ldd
endif

.PHONY: all
all: dev
all: prepare index
$(REGISTRY)/sourcemeta-registry-server $(OUTPUT)

.PHONY: prepare
prepare:
@echo "Running prepare steps"
$(LDD) $(REGISTRY)/sourcemeta-registry-index
$(LDD) $(REGISTRY)/sourcemeta-registry-server

.PHONY: dev
dev: configuration.json prepare
.PHONY: index
index: configuration.json
$(REGISTRY)/sourcemeta-registry-index $< $(OUTPUT)
$(REGISTRY)/sourcemeta-registry-server $(OUTPUT)

.PHONY: clean
clean:
Expand Down

0 comments on commit cd3eab6

Please sign in to comment.