diff --git a/web/Makefile b/web/Makefile index 4f3cf0980..ba0e5a7d8 100644 --- a/web/Makefile +++ b/web/Makefile @@ -13,10 +13,16 @@ all: blob -blob: +blob: static/generated/protocol_buffer.descriptor $(MAKE) -C blob clean: $(MAKE) -C blob clean +static/generated: + mkdir -vp static/generated + +static/generated/protocol_buffer.descriptor: static/generated ../model/generated/descriptor.blob + cp ../model/generated/descriptor.blob -f $@ + .PHONY: blob clean diff --git a/web/blob/Makefile b/web/blob/Makefile index 171d1affb..5c64fa192 100644 --- a/web/blob/Makefile +++ b/web/blob/Makefile @@ -15,14 +15,8 @@ all: files.go SUFFIXES: -generated: - mkdir -vp generated - -generated/protocol_buffer.descriptor: generated ../../model/generated/descriptor.blob - cp ../../model/generated/descriptor.blob -f $@ - -files.go: $(shell find ../templates/ ../static/ -type f) generated/protocol_buffer.descriptor - ../../utility/embed-static.sh ../static ../templates ./generated | gofmt > $@ +files.go: $(shell find ../templates/ ../static/ -type f) + ../../utility/embed-static.sh ../static ../templates | gofmt > $@ clean: -rm files.go diff --git a/web/blob/blob.go b/web/blob/blob.go index 5ba0b0ee2..2edd278b9 100644 --- a/web/blob/blob.go +++ b/web/blob/blob.go @@ -16,8 +16,9 @@ const ( ) var mimeMap = map[string]string{ - "css": "text/css", - "js": "text/javascript", + "css": "text/css", + "js": "text/javascript", + "descriptor": "application/vnd.google.protobuf;proto=google.protobuf.FileDescriptorSet", } func GetFile(bucket string, name string) ([]byte, error) {