Skip to content

Commit

Permalink
Updated makerules 2024-12-18
Browse files Browse the repository at this point in the history
  • Loading branch information
digital-land-bot committed Dec 18, 2024
1 parent 5020771 commit 94fadd3
Showing 1 changed file with 6 additions and 14 deletions.
20 changes: 6 additions & 14 deletions makerules/makerules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand Down

0 comments on commit 94fadd3

Please sign in to comment.