From 966d6a4e8e9f044945772cc732480c59372259dc Mon Sep 17 00:00:00 2001 From: digital-land-bot Date: Tue, 5 Nov 2024 05:04:29 +0000 Subject: [PATCH] Updated makerules 2024-11-05 --- makerules/makerules.mk | 2 ++ makerules/pipeline.mk | 7 ++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/makerules/makerules.mk b/makerules/makerules.mk index 7532129..d6ed246 100644 --- a/makerules/makerules.mk +++ b/makerules/makerules.mk @@ -71,7 +71,9 @@ LANG := C.UTF-8 LC_COLLATE := C.UTF-8 # current git branch +ifeq ($(BRANCH),) BRANCH := $(shell git rev-parse --abbrev-ref HEAD) +endif UNAME := $(shell uname) diff --git a/makerules/pipeline.mk b/makerules/pipeline.mk index c439bbb..3628f4f 100644 --- a/makerules/pipeline.mk +++ b/makerules/pipeline.mk @@ -45,6 +45,10 @@ ifeq ($(ISSUE_DIR),) ISSUE_DIR=issue/ endif +ifeq ($(OUTPUT_LOG_DIR),) +OUTPUT_LOG_DIR=log/ +endif + ifeq ($(PERFORMANCE_DIR),) PERFORMANCE_DIR=performance/ endif @@ -107,7 +111,7 @@ PIPELINE_CONFIG_FILES=\ endif define run-pipeline - mkdir -p $(@D) $(ISSUE_DIR)$(notdir $(@D)) $(OPERATIONAL_ISSUE_DIR) $(COLUMN_FIELD_DIR)$(notdir $(@D)) $(DATASET_RESOURCE_DIR)$(notdir $(@D)) $(CONVERTED_RESOURCE_DIR)$(notdir $(@D)) + mkdir -p $(@D) $(ISSUE_DIR)$(notdir $(@D)) $(OPERATIONAL_ISSUE_DIR) $(OUTPUT_LOG_DIR) $(COLUMN_FIELD_DIR)$(notdir $(@D)) $(DATASET_RESOURCE_DIR)$(notdir $(@D)) $(CONVERTED_RESOURCE_DIR)$(notdir $(@D)) digital-land ${DIGITAL_LAND_OPTS} --dataset $(notdir $(@D)) --pipeline-dir $(PIPELINE_DIR) $(DIGITAL_LAND_FLAGS) pipeline $(1) --issue-dir $(ISSUE_DIR)$(notdir $(@D)) --column-field-dir $(COLUMN_FIELD_DIR)$(notdir $(@D)) --dataset-resource-dir $(DATASET_RESOURCE_DIR)$(notdir $(@D)) --converted-resource-dir $(CONVERTED_RESOURCE_DIR)$(notdir $(@D)) --config-path $(CACHE_DIR)config.sqlite3 --organisation-path $(CACHE_DIR)organisation.csv $(PIPELINE_FLAGS) $< $@ endef @@ -188,6 +192,7 @@ save-transformed:: aws s3 sync $(COLUMN_FIELD_DIR) s3://$(COLLECTION_DATASET_BUCKET_NAME)/$(REPOSITORY)/$(COLUMN_FIELD_DIR) --no-progress aws s3 sync $(DATASET_RESOURCE_DIR) s3://$(COLLECTION_DATASET_BUCKET_NAME)/$(REPOSITORY)/$(DATASET_RESOURCE_DIR) --no-progress aws s3 sync $(CONVERTED_RESOURCE_DIR) s3://$(COLLECTION_DATASET_BUCKET_NAME)/$(REPOSITORY)/$(CONVERTED_RESOURCE_DIR) --no-progress + aws s3 sync $(OUTPUT_LOG_DIR) s3://$(COLLECTION_DATASET_BUCKET_NAME)/$(OUTPUT_LOG_DIR) --no-progress save-dataset:: @mkdir -p $(DATASET_DIR)