Skip to content

Commit 5fd3fe2

Browse files
committed
Simplify local development targets and Dockerfile
Signed-off-by: Juan Cruz Viotti <[email protected]>
1 parent eef27e4 commit 5fd3fe2

File tree

2 files changed

+10
-16
lines changed

2 files changed

+10
-16
lines changed

Dockerfile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,11 @@ RUN apt-get --yes update && apt-get install --yes --no-install-recommends make n
99
COPY configuration.json /app/configuration.json
1010
COPY vendor /app/vendor
1111
COPY Makefile /app/Makefile
12-
RUN make -C /app prepare index REGISTRY=/usr/bin OUTPUT=/app/index
12+
RUN make -C /app prepare
13+
RUN ldd /usr/bin/sourcemeta-registry-index
14+
RUN ldd /usr/bin/sourcemeta-registry-server
15+
ENV SOURCEMETA_REGISTRY_I_HAVE_A_COMMERCIAL_LICENSE 1
16+
RUN /usr/bin/sourcemeta-registry-index /app/configuration.json /app/index
1317

1418
FROM scratch
1519
COPY --from=builder /usr/bin/sourcemeta-registry-server \

Makefile

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,12 @@ REGISTRY ?= ../registry/build/dist/bin
88
BUILD ?= ./build
99
OUTPUT ?= $(BUILD)/registry
1010

11-
ifeq ($(shell uname), Darwin)
12-
LDD ?= otool -L
13-
else
14-
LDD ?= ldd
15-
endif
16-
1711
.PHONY: all
18-
all: prepare index
19-
$(REGISTRY)/sourcemeta-registry-server $(OUTPUT)
12+
all: configuration.json prepare
13+
SOURCEMETA_REGISTRY_I_HAVE_A_COMMERCIAL_LICENSE=1 \
14+
$(REGISTRY)/sourcemeta-registry-index $< $(OUTPUT)
15+
SOURCEMETA_REGISTRY_I_HAVE_A_COMMERCIAL_LICENSE=1 \
16+
$(REGISTRY)/sourcemeta-registry-server $(OUTPUT)
2017

2118
define geojson_prepare
2219
$(BUILD)/geojson-$(1)/%.json: vendor/geojson-$(1)/bin/format.js vendor/geojson-$(1)/src/schema/%.js
@@ -38,13 +35,6 @@ prepare: \
3835
$(patsubst vendor/geojson-1-0-2/src/schema/%.js,$(BUILD)/geojson-1-0-2/%.json,$(wildcard vendor/geojson-1-0-2/src/schema/*.js)) \
3936
$(patsubst vendor/geojson-1-0-1/src/schema/%.js,$(BUILD)/geojson-1-0-1/%.json,$(wildcard vendor/geojson-1-0-1/src/schema/*.js)) \
4037
$(patsubst vendor/geojson-1-0-0/src/schema/%.js,$(BUILD)/geojson-1-0-0/%.json,$(wildcard vendor/geojson-1-0-0/src/schema/*.js))
41-
$(LDD) $(REGISTRY)/sourcemeta-registry-index
42-
$(LDD) $(REGISTRY)/sourcemeta-registry-server
43-
44-
.PHONY: index
45-
index: configuration.json
46-
SOURCEMETA_REGISTRY_I_HAVE_A_COMMERCIAL_LICENSE=1 \
47-
$(REGISTRY)/sourcemeta-registry-index $< $(OUTPUT)
4838

4939
.PHONY: clean
5040
clean:

0 commit comments

Comments
 (0)