mirror of
https://github.com/minio/minio.git
synced 2025-11-10 14:09:48 -05:00
contentdb file.ext to content-type lookups
This commit is contained in:
26
pkg/contentdb/Makefile
Normal file
26
pkg/contentdb/Makefile
Normal file
@@ -0,0 +1,26 @@
|
||||
# Generate db.go from db.json downloaded nodejs mime-db project.
|
||||
# NOTE: Autogenerated db.go needs to be vet proofed. \
|
||||
Manually edit json -> JSON for all variable names
|
||||
all: checkdeps download build
|
||||
|
||||
# go-bindata generates go source from any data file.
|
||||
checkdeps:
|
||||
@go get -u github.com/jteeuwen/go-bindata/...
|
||||
|
||||
# Download db.json from NodeJS's mime-db project. It is under MIT license.
|
||||
download: checkdeps
|
||||
@mkdir db
|
||||
@wget -nv https://cdn.rawgit.com/jshttp/mime-db/master/db.json -O db/db.json
|
||||
|
||||
|
||||
# After generating db.go, clean up downloaded db.json.
|
||||
build: download
|
||||
@go-bindata -pkg contentdb -o db.go db
|
||||
@rm -fv db/db.json
|
||||
@rm -rfv db
|
||||
|
||||
# Clean auto-generated files and backups.
|
||||
clean:
|
||||
@rm -rf db.go
|
||||
@rm -f *~
|
||||
|
||||
Reference in New Issue
Block a user