diff --git a/makerules/makerules.mk b/makerules/makerules.mk index 06e68772..89e1cfbf 100644 --- a/makerules/makerules.mk +++ b/makerules/makerules.mk @@ -16,25 +16,13 @@ MAKERULES_URL=$(SOURCE_URL)makerules/main/ endif ifeq ($(CONFIG_URL),) -CONFIG_URL=https://files.planning.data.gov.uk/config/ +CONFIG_URL=$(DATASTORE_URL)config/ endif ifeq ($(COLLECTION_NAME),) COLLECTION_NAME=$(shell echo "$(REPOSITORY)"|sed 's/-collection$$//') endif -ifeq ($(COLLECTION_DATASET_BUCKET_NAME),) -COLLECTION_DATASET_BUCKET_NAME=digital-land-$(ENVIRONMENT)-collection-dataset -endif - -ifeq ($(HOISTED_COLLECTION_DATASET_BUCKET_NAME),) -HOISTED_COLLECTION_DATASET_BUCKET_NAME=digital-land-$(ENVIRONMENT)-collection-dataset-hoisted -endif - -define dataset_url -'https://$(COLLECTION_DATASET_BUCKET_NAME).s3.eu-west-2.amazonaws.com/$(2)-collection/dataset/$(1).sqlite3' -endef - ifeq ($(VAR_DIR),) VAR_DIR=var/ endif @@ -156,7 +144,11 @@ endif # local copy of organsiation datapackage $(CACHE_DIR)organisation.csv: @mkdir -p $(CACHE_DIR) - curl -qfs "https://files.planning.data.gov.uk/organisation-collection/dataset/organisation.csv" > $(CACHE_DIR)organisation.csv +ifeq ($(COLLECTION_DATASET_BUCKET_NAME),) + curl -qfs "$(DATASTORE_URL)organisation-collection/dataset/organisation.csv" > $(CACHE_DIR)organisation.csv +else + aws s3 cp s3://$(COLLECTION_DATASET_BUCKET_NAME)/organisation-collection/dataset/organisation.csv $(CACHE_DIR)organisation.csv +endif init:: config