diff --git a/.platform/schema b/.platform/schema index da2d3988..3f10ffe7 100644 --- a/.platform/schema +++ b/.platform/schema @@ -1 +1 @@ -14 \ No newline at end of file +15 \ No newline at end of file diff --git a/Makefile b/Makefile index 27392cb1..44ee5d48 100644 --- a/Makefile +++ b/Makefile @@ -1,17 +1,36 @@ PHONY := PROJECT_DIR := $(dir $(lastword $(MAKEFILE_LIST))) +# Colors +NO_COLOR=\033[0m +CYAN=\033[36m +GREEN=\033[0;32m +RED=\033[0;31m +YELLOW=\033[0;33m + +ENV := local + # Include project env vars (if exists) -include .env -include .env.local -# Include druidfi/tools config -include $(PROJECT_DIR)/tools/make/Makefile +define step + @printf "\n⭐ ${YELLOW}${1}${NO_COLOR}\n" +endef + +PHONY += help +help: ## List all make commands + $(call step,Available make commands:\n) + @cat $(MAKEFILE_LIST) | grep -e "^[a-zA-Z_\-]*: *.*## *" | awk 'BEGIN {FS = ":.*?## "}; {printf "${CYAN}%-30s${NO_COLOR} %s\n", $$1, $$2}' -# Include project specific make files (if they exist) --include $(PROJECT_DIR)/tools/make/project/*.mk +# Allow projects to specify makefiles. +-include tools/make/project/*.mk -# Project specific overrides for variables (if they exist) --include $(PROJECT_DIR)/tools/make/override.mk +include tools/make/docker.mk +include tools/make/composer.mk +include tools/make/drupal.mk +include tools/make/git.mk +include tools/make/theme.mk +include tools/make/qa.mk .PHONY: $(PHONY) diff --git a/composer.lock b/composer.lock index f12fb252..d0857d2f 100644 --- a/composer.lock +++ b/composer.lock @@ -64,16 +64,16 @@ }, { "name": "caxy/php-htmldiff", - "version": "v0.1.15", + "version": "v0.1.16", "source": { "type": "git", "url": "https://github.com/caxy/php-htmldiff.git", - "reference": "6342b02ddb86fd36093ad7e2db2efc21f01ab7cd" + "reference": "5c580b4f09285c078f0c5cb261573412a736a8cb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/caxy/php-htmldiff/zipball/6342b02ddb86fd36093ad7e2db2efc21f01ab7cd", - "reference": "6342b02ddb86fd36093ad7e2db2efc21f01ab7cd", + "url": "https://api.github.com/repos/caxy/php-htmldiff/zipball/5c580b4f09285c078f0c5cb261573412a736a8cb", + "reference": "5c580b4f09285c078f0c5cb261573412a736a8cb", "shasum": "" }, "require": { @@ -119,9 +119,9 @@ ], "support": { "issues": "https://github.com/caxy/php-htmldiff/issues", - "source": "https://github.com/caxy/php-htmldiff/tree/v0.1.15" + "source": "https://github.com/caxy/php-htmldiff/tree/v0.1.16" }, - "time": "2023-11-05T23:49:04+00:00" + "time": "2025-01-22T17:03:45+00:00" }, { "name": "chi-teck/drupal-code-generator", @@ -1951,8 +1951,8 @@ "version": "1.0.2", "datestamp": "1695740655", "security-coverage": { - "status": "covered", - "message": "Covered by Drupal's security advisory policy" + "status": "not-covered", + "message": "Project has not opted into security advisory coverage!" } } }, @@ -1961,10 +1961,6 @@ "GPL-2.0-or-later" ], "authors": [ - { - "name": "dczepierga", - "homepage": "https://www.drupal.org/user/911466" - }, { "name": "hass", "homepage": "https://www.drupal.org/user/85918" @@ -1982,13 +1978,9 @@ "homepage": "https://www.drupal.org/user/1078742" }, { - "name": "Magnus", + "name": "magnus", "homepage": "https://www.drupal.org/user/73919" }, - { - "name": "mkesicki", - "homepage": "https://www.drupal.org/user/922884" - }, { "name": "nod_", "homepage": "https://www.drupal.org/user/598310" @@ -2002,7 +1994,7 @@ "homepage": "https://www.drupal.org/user/2793801" }, { - "name": "Wim Leers", + "name": "wim leers", "homepage": "https://www.drupal.org/user/99777" }, { @@ -2901,17 +2893,17 @@ }, { "name": "drupal/editoria11y", - "version": "2.2.0", + "version": "2.2.4", "source": { "type": "git", "url": "https://git.drupalcode.org/project/editoria11y.git", - "reference": "2.2.0" + "reference": "2.2.4" }, "dist": { "type": "zip", - "url": "https://ftp.drupal.org/files/projects/editoria11y-2.2.0.zip", - "reference": "2.2.0", - "shasum": "fc06c2b27be7432f4692e37c787fa935e9d4f9f7" + "url": "https://ftp.drupal.org/files/projects/editoria11y-2.2.4.zip", + "reference": "2.2.4", + "shasum": "6342f0614083f90088c48f8f74a231a495bf8ebe" }, "require": { "drupal/core": "^9 || ^10 || ^11" @@ -2922,8 +2914,8 @@ "type": "drupal-module", "extra": { "drupal": { - "version": "2.2.0", - "datestamp": "1736189388", + "version": "2.2.4", + "datestamp": "1737647999", "security-coverage": { "status": "covered", "message": "Covered by Drupal's security advisory policy" @@ -3340,17 +3332,17 @@ }, { "name": "drupal/entity_usage", - "version": "2.0.0-beta16", + "version": "2.0.0-beta17", "source": { "type": "git", "url": "https://git.drupalcode.org/project/entity_usage.git", - "reference": "8.x-2.0-beta16" + "reference": "8.x-2.0-beta17" }, "dist": { "type": "zip", - "url": "https://ftp.drupal.org/files/projects/entity_usage-8.x-2.0-beta16.zip", - "reference": "8.x-2.0-beta16", - "shasum": "af6533149a0926d2d539f279e7e08073f8f08c55" + "url": "https://ftp.drupal.org/files/projects/entity_usage-8.x-2.0-beta17.zip", + "reference": "8.x-2.0-beta17", + "shasum": "29691274f6b68b13a8d1ba295677453c85c2ed39" }, "require": { "drupal/core": "^10.2 || ^11" @@ -3370,8 +3362,8 @@ "type": "drupal-module", "extra": { "drupal": { - "version": "8.x-2.0-beta16", - "datestamp": "1733149424", + "version": "8.x-2.0-beta17", + "datestamp": "1736865887", "security-coverage": { "status": "not-covered", "message": "Beta releases are not covered by Drupal security advisories." @@ -4073,16 +4065,16 @@ }, { "name": "drupal/hdbt", - "version": "6.8.34", + "version": "6.9.4", "source": { "type": "git", "url": "https://github.com/City-of-Helsinki/drupal-hdbt.git", - "reference": "9216d2943483e75e9f5d9ed11eba03e836c93f98" + "reference": "aa5d86120d9a7c605f6339a0bce8613bc84ddd65" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/City-of-Helsinki/drupal-hdbt/zipball/9216d2943483e75e9f5d9ed11eba03e836c93f98", - "reference": "9216d2943483e75e9f5d9ed11eba03e836c93f98", + "url": "https://api.github.com/repos/City-of-Helsinki/drupal-hdbt/zipball/aa5d86120d9a7c605f6339a0bce8613bc84ddd65", + "reference": "aa5d86120d9a7c605f6339a0bce8613bc84ddd65", "shasum": "" }, "require": { @@ -4101,10 +4093,10 @@ "Drupal" ], "support": { - "source": "https://github.com/City-of-Helsinki/drupal-hdbt/tree/6.8.34", + "source": "https://github.com/City-of-Helsinki/drupal-hdbt/tree/6.9.4", "issues": "https://github.com/City-of-Helsinki/drupal-hdbt/issues" }, - "time": "2025-01-14T10:26:39+00:00" + "time": "2025-01-28T14:27:33+00:00" }, { "name": "drupal/hdbt_admin", @@ -4292,12 +4284,12 @@ "source": { "type": "git", "url": "https://github.com/City-of-Helsinki/drupal-tools.git", - "reference": "2eb037b210a0c311ad8e742d3c1fd97e89d7b677" + "reference": "bc5416375195d1307adf188098d75a19a5de0224" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/City-of-Helsinki/drupal-tools/zipball/2eb037b210a0c311ad8e742d3c1fd97e89d7b677", - "reference": "2eb037b210a0c311ad8e742d3c1fd97e89d7b677", + "url": "https://api.github.com/repos/City-of-Helsinki/drupal-tools/zipball/bc5416375195d1307adf188098d75a19a5de0224", + "reference": "bc5416375195d1307adf188098d75a19a5de0224", "shasum": "" }, "require": { @@ -4372,7 +4364,7 @@ "source": "https://github.com/City-of-Helsinki/drupal-tools/tree/main", "issues": "https://github.com/City-of-Helsinki/drupal-tools/issues" }, - "time": "2024-12-17T10:07:01+00:00" + "time": "2025-01-15T12:24:04+00:00" }, { "name": "drupal/helfi_navigation", @@ -4410,16 +4402,16 @@ }, { "name": "drupal/helfi_platform_config", - "version": "4.12.3", + "version": "4.12.12", "source": { "type": "git", "url": "https://github.com/City-of-Helsinki/drupal-helfi-platform-config.git", - "reference": "fb0ab912a4fe38d695cbfeb84ee623ea644dd6a2" + "reference": "b60ca835a667e8a6a2c90350bf0de34f0a9ee74e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/City-of-Helsinki/drupal-helfi-platform-config/zipball/fb0ab912a4fe38d695cbfeb84ee623ea644dd6a2", - "reference": "fb0ab912a4fe38d695cbfeb84ee623ea644dd6a2", + "url": "https://api.github.com/repos/City-of-Helsinki/drupal-helfi-platform-config/zipball/b60ca835a667e8a6a2c90350bf0de34f0a9ee74e", + "reference": "b60ca835a667e8a6a2c90350bf0de34f0a9ee74e", "shasum": "" }, "require": { @@ -4543,10 +4535,10 @@ ], "description": "HELfi platform config", "support": { - "source": "https://github.com/City-of-Helsinki/drupal-helfi-platform-config/tree/4.12.3", + "source": "https://github.com/City-of-Helsinki/drupal-helfi-platform-config/tree/4.12.12", "issues": "https://github.com/City-of-Helsinki/drupal-helfi-platform-config/issues" }, - "time": "2025-01-13T06:44:52+00:00" + "time": "2025-01-28T14:33:21+00:00" }, { "name": "drupal/helfi_proxy", @@ -6162,17 +6154,17 @@ }, { "name": "drupal/redirect", - "version": "1.10.0", + "version": "1.11.0", "source": { "type": "git", "url": "https://git.drupalcode.org/project/redirect.git", - "reference": "8.x-1.10" + "reference": "8.x-1.11" }, "dist": { "type": "zip", - "url": "https://ftp.drupal.org/files/projects/redirect-8.x-1.10.zip", - "reference": "8.x-1.10", - "shasum": "9d72d7e0717dbdea3ab3306c5d6840da5bd3024c" + "url": "https://ftp.drupal.org/files/projects/redirect-8.x-1.11.zip", + "reference": "8.x-1.11", + "shasum": "7df8b3524bbde07d254216039636947a689140ef" }, "require": { "drupal/core": "^9.2 || ^10 || ^11" @@ -6180,8 +6172,8 @@ "type": "drupal-module", "extra": { "drupal": { - "version": "8.x-1.10", - "datestamp": "1723277641", + "version": "8.x-1.11", + "datestamp": "1737382886", "security-coverage": { "status": "covered", "message": "Covered by Drupal's security advisory policy" @@ -7108,26 +7100,26 @@ }, { "name": "drupal/translatable_menu_link_uri", - "version": "2.1.0", + "version": "2.1.1", "source": { "type": "git", "url": "https://git.drupalcode.org/project/translatable_menu_link_uri.git", - "reference": "2.1.0" + "reference": "2.1.1" }, "dist": { "type": "zip", - "url": "https://ftp.drupal.org/files/projects/translatable_menu_link_uri-2.1.0.zip", - "reference": "2.1.0", - "shasum": "3bafa0a19761524560a2d232c945f10643e91053" + "url": "https://ftp.drupal.org/files/projects/translatable_menu_link_uri-2.1.1.zip", + "reference": "2.1.1", + "shasum": "862b0f0317ac37f8849d9f3725bcf44940d98dbf" }, "require": { - "drupal/core": "^8 || ^9 || ^10" + "drupal/core": "^8 || ^9 || ^10 || ^11" }, "type": "drupal-module", "extra": { "drupal": { - "version": "2.1.0", - "datestamp": "1694361965", + "version": "2.1.1", + "datestamp": "1737392436", "security-coverage": { "status": "covered", "message": "Covered by Drupal's security advisory policy" @@ -8115,16 +8107,16 @@ }, { "name": "firebase/php-jwt", - "version": "v6.10.2", + "version": "v6.11.0", "source": { "type": "git", "url": "https://github.com/firebase/php-jwt.git", - "reference": "30c19ed0f3264cb660ea496895cfb6ef7ee3653b" + "reference": "8f718f4dfc9c5d5f0c994cdfd103921b43592712" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/firebase/php-jwt/zipball/30c19ed0f3264cb660ea496895cfb6ef7ee3653b", - "reference": "30c19ed0f3264cb660ea496895cfb6ef7ee3653b", + "url": "https://api.github.com/repos/firebase/php-jwt/zipball/8f718f4dfc9c5d5f0c994cdfd103921b43592712", + "reference": "8f718f4dfc9c5d5f0c994cdfd103921b43592712", "shasum": "" }, "require": { @@ -8172,9 +8164,9 @@ ], "support": { "issues": "https://github.com/firebase/php-jwt/issues", - "source": "https://github.com/firebase/php-jwt/tree/v6.10.2" + "source": "https://github.com/firebase/php-jwt/tree/v6.11.0" }, - "time": "2024-11-24T11:22:49+00:00" + "time": "2025-01-23T05:11:06+00:00" }, { "name": "galbar/jsonpath", @@ -9641,16 +9633,16 @@ }, { "name": "open-telemetry/api", - "version": "1.2.0", + "version": "1.2.1", "source": { "type": "git", "url": "https://github.com/opentelemetry-php/api.git", - "reference": "351a30baa79699de3de3a814c8ccc7b52ccdfb1d" + "reference": "74b1a03263be8c5acb578f41da054b4bac3af4a0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/opentelemetry-php/api/zipball/351a30baa79699de3de3a814c8ccc7b52ccdfb1d", - "reference": "351a30baa79699de3de3a814c8ccc7b52ccdfb1d", + "url": "https://api.github.com/repos/opentelemetry-php/api/zipball/74b1a03263be8c5acb578f41da054b4bac3af4a0", + "reference": "74b1a03263be8c5acb578f41da054b4bac3af4a0", "shasum": "" }, "require": { @@ -9707,7 +9699,7 @@ "issues": "https://github.com/open-telemetry/opentelemetry-php/issues", "source": "https://github.com/open-telemetry/opentelemetry-php" }, - "time": "2025-01-08T23:50:34+00:00" + "time": "2025-01-20T23:35:16+00:00" }, { "name": "open-telemetry/context", diff --git a/conf/cmi/external_entities.external_entity_type.helfi_news_neighbourhoods.yml b/conf/cmi/external_entities.external_entity_type.helfi_news_neighbourhoods.yml index 7e467bb7..4b7ab20a 100644 --- a/conf/cmi/external_entities.external_entity_type.helfi_news_neighbourhoods.yml +++ b/conf/cmi/external_entities.external_entity_type.helfi_news_neighbourhoods.yml @@ -3,7 +3,7 @@ langcode: en status: true dependencies: { } _core: - default_config_hash: 5s8g-adBsUuIIMte5BCEwSFlQjxwFJ_Gq2Do7EEwq2E + default_config_hash: 09-lIa9cl9PNPVIBXCVIR8yBfofPifSwhAsD0QVh8l8 id: helfi_news_neighbourhoods label: 'Helfi: News neighbourhoods' label_plural: 'Helfi: News neighbourhoods' @@ -21,6 +21,8 @@ field_mapper_config: value: '$._source.name[0]' tid: value: '$._source.tid[0]' + location: + value: $._source.field_location storage_client_id: helfi_news_neighbourhoods storage_client_config: { } persistent_cache_max_age: 86400 diff --git a/conf/cmi/hdbt_admin_tools.site_settings.yml b/conf/cmi/hdbt_admin_tools.site_settings.yml index 3ba79232..ca1460b2 100644 --- a/conf/cmi/hdbt_admin_tools.site_settings.yml +++ b/conf/cmi/hdbt_admin_tools.site_settings.yml @@ -1,10 +1,10 @@ _core: default_config_hash: OgPHnjkIjDn42IHAwLRXhNzdhX825gq2SrlYKw4kbQ8 langcode: en +path_to_json: /themes/contrib/hdbt/src/icons/editor-selectable-icons.json site_settings: default_icon: group theme_color: silver koro: basic footer_settings: footer_color: dark -path_to_json: /themes/contrib/hdbt/src/icons/editor-selectable-icons.json diff --git a/conf/cmi/language/fi/views.view.archive.yml b/conf/cmi/language/fi/views.view.archive.yml index c18dbd7d..720c7489 100644 --- a/conf/cmi/language/fi/views.view.archive.yml +++ b/conf/cmi/language/fi/views.view.archive.yml @@ -8,8 +8,8 @@ display: pager: options: tags: - next: 'Seuraava ›' - previous: '‹ Edellinen' + next: Seuraava + previous: Edellinen expose: items_per_page_label: 'Merkintöjä sivua kohti' items_per_page_options_all_label: '- Kaikki -' diff --git a/conf/cmi/language/fi/views.view.content.yml b/conf/cmi/language/fi/views.view.content.yml index fb036d95..dabc7aaf 100644 --- a/conf/cmi/language/fi/views.view.content.yml +++ b/conf/cmi/language/fi/views.view.content.yml @@ -25,10 +25,10 @@ display: pager: options: tags: - next: 'Seuraava ›' - previous: '‹ Edellinen' - first: '« Ensimmäinen' - last: 'Viimeinen »' + next: Seuraava + previous: Edellinen + first: Ensimmäinen + last: Viimeinen exposed_form: options: submit_button: Suodata @@ -54,6 +54,8 @@ display: group_items: 1: title: Julkaistu + 2: + title: Julkaisematon langcode: expose: label: Kieli diff --git a/conf/cmi/language/fi/views.view.er_tpr_unit.yml b/conf/cmi/language/fi/views.view.er_tpr_unit.yml index 2ce32d9d..b27b10c2 100644 --- a/conf/cmi/language/fi/views.view.er_tpr_unit.yml +++ b/conf/cmi/language/fi/views.view.er_tpr_unit.yml @@ -5,8 +5,8 @@ display: pager: options: tags: - next: 'Seuraava ›' - previous: '‹ Edellinen' + next: Seuraava + previous: Edellinen expose: items_per_page_label: 'Merkintöjä sivua kohti' items_per_page_options_all_label: '- Kaikki -' diff --git a/conf/cmi/language/fi/views.view.files.yml b/conf/cmi/language/fi/views.view.files.yml index 32d7ce0d..95e17ad0 100644 --- a/conf/cmi/language/fi/views.view.files.yml +++ b/conf/cmi/language/fi/views.view.files.yml @@ -14,8 +14,8 @@ display: pager: options: tags: - previous: '‹ Edellinen' - next: 'Seuraava ›' + previous: Edellinen + next: Seuraava expose: items_per_page_label: 'Merkintöjä sivua kohti' items_per_page_options_all_label: '- Kaikki -' @@ -66,8 +66,8 @@ display: pager: options: tags: - previous: '‹ Edellinen' - next: 'Seuraava ›' + previous: Edellinen + next: Seuraava expose: items_per_page_label: 'Merkintöjä sivua kohti' items_per_page_options_all_label: '- Kaikki -' diff --git a/conf/cmi/language/fi/views.view.glossary.yml b/conf/cmi/language/fi/views.view.glossary.yml index 683d043b..240fa493 100644 --- a/conf/cmi/language/fi/views.view.glossary.yml +++ b/conf/cmi/language/fi/views.view.glossary.yml @@ -13,8 +13,8 @@ display: pager: options: tags: - next: 'Seuraava ›' - previous: '‹ Edellinen' + next: Seuraava + previous: Edellinen expose: items_per_page_label: 'Merkintöjä sivua kohti' items_per_page_options_all_label: '- Kaikki -' diff --git a/conf/cmi/language/fi/views.view.helfi_redirect.yml b/conf/cmi/language/fi/views.view.helfi_redirect.yml index 039970d4..882c6b6d 100644 --- a/conf/cmi/language/fi/views.view.helfi_redirect.yml +++ b/conf/cmi/language/fi/views.view.helfi_redirect.yml @@ -51,10 +51,10 @@ display: items_per_page_options_all_label: '- Kaikki -' offset_label: Offset tags: - previous: '‹ edellinen' - next: 'seuraava ›' - first: '« ensimmäinen' - last: 'viimeinen »' + previous: Edellinen + next: Seuraava + first: Ensimmäinen + last: Viimeinen fields: redirect_bulk_form: action_title: Valinnalla diff --git a/conf/cmi/language/fi/views.view.locked_content.yml b/conf/cmi/language/fi/views.view.locked_content.yml index 063ed8d8..a6433b54 100644 --- a/conf/cmi/language/fi/views.view.locked_content.yml +++ b/conf/cmi/language/fi/views.view.locked_content.yml @@ -14,10 +14,10 @@ display: pager: options: tags: - previous: '‹ Edellinen' - next: 'Seuraava ›' - first: '« Ensimmäinen' - last: 'Viimeinen »' + previous: Edellinen + next: Seuraava + first: Ensimmäinen + last: Viimeinen expose: items_per_page_label: 'Merkintöjä sivua kohti' items_per_page_options_all_label: '- Kaikki -' @@ -58,7 +58,7 @@ display: label: Otsikko empty: area_text_custom: - content: 'Lukittuja toimipisteitä ei ole.' + content: 'Lukittua sisältöä ei ole.' page_1: display_title: Sivu display_options: diff --git a/conf/cmi/language/fi/views.view.locked_services.yml b/conf/cmi/language/fi/views.view.locked_services.yml index b3157fcc..bb00dc85 100644 --- a/conf/cmi/language/fi/views.view.locked_services.yml +++ b/conf/cmi/language/fi/views.view.locked_services.yml @@ -24,10 +24,10 @@ display: pager: options: tags: - next: 'Seuraava ›' - previous: '‹ Edellinen' - first: '« Ensimmäinen' - last: 'Viimeinen »' + next: Seuraava + previous: Edellinen + first: Ensimmäinen + last: Viimeinen expose: offset_label: Offset items_per_page_label: 'Merkintöjä sivua kohti' diff --git a/conf/cmi/language/fi/views.view.locked_units.yml b/conf/cmi/language/fi/views.view.locked_units.yml index 6a0fc3f9..d1beb1d5 100644 --- a/conf/cmi/language/fi/views.view.locked_units.yml +++ b/conf/cmi/language/fi/views.view.locked_units.yml @@ -24,10 +24,10 @@ display: pager: options: tags: - next: 'Seuraava ›' - previous: '‹ Edellinen' - first: '« Ensimmäinen' - last: 'Viimeinen »' + next: Seuraava + previous: Edellinen + first: Ensimmäinen + last: Viimeinen expose: items_per_page_label: 'Merkintöjä sivua kohti' items_per_page_options_all_label: '- Kaikki -' diff --git a/conf/cmi/language/fi/views.view.media.yml b/conf/cmi/language/fi/views.view.media.yml index 631b568f..4051a51b 100644 --- a/conf/cmi/language/fi/views.view.media.yml +++ b/conf/cmi/language/fi/views.view.media.yml @@ -32,10 +32,10 @@ display: pager: options: tags: - next: 'Seuraava ›' - previous: '‹ Edellinen' - first: '« Ensimmäinen' - last: 'Viimeinen »' + next: Seuraava + previous: Edellinen + first: Ensimmäinen + last: Viimeinen expose: items_per_page_label: 'Merkintöjä sivua kohti' items_per_page_options_all_label: '- Kaikki -' diff --git a/conf/cmi/language/fi/views.view.media_library.yml b/conf/cmi/language/fi/views.view.media_library.yml index 3ac1af27..641d4783 100644 --- a/conf/cmi/language/fi/views.view.media_library.yml +++ b/conf/cmi/language/fi/views.view.media_library.yml @@ -10,8 +10,8 @@ display: pager: options: tags: - next: 'Seuraava ›' - previous: '‹ Edellinen' + next: Seuraava + previous: Edellinen expose: items_per_page_label: 'Merkintöjä sivua kohti' items_per_page_options_all_label: '- Kaikki -' @@ -45,6 +45,8 @@ display: group_items: 1: title: Julkaistu + 2: + title: Julkaisematon name: expose: label: Nimi diff --git a/conf/cmi/language/fi/views.view.paragraphs_library.yml b/conf/cmi/language/fi/views.view.paragraphs_library.yml index dd254064..8e28dfc3 100644 --- a/conf/cmi/language/fi/views.view.paragraphs_library.yml +++ b/conf/cmi/language/fi/views.view.paragraphs_library.yml @@ -13,8 +13,8 @@ display: pager: options: tags: - previous: '‹ Edellinen' - next: 'Seuraava ›' + previous: Edellinen + next: Seuraava expose: items_per_page_label: 'Merkintöjä sivua kohti' items_per_page_options_all_label: '- Kaikki -' diff --git a/conf/cmi/language/fi/views.view.redirect.yml b/conf/cmi/language/fi/views.view.redirect.yml index ce80901e..4999d064 100644 --- a/conf/cmi/language/fi/views.view.redirect.yml +++ b/conf/cmi/language/fi/views.view.redirect.yml @@ -14,10 +14,10 @@ display: pager: options: tags: - previous: '‹ edellinen' - next: 'seuraava ›' - first: '« ensimmäinen' - last: 'viimeinen »' + previous: Edellinen + next: Seuraava + first: Ensimmäinen + last: Viimeinen expose: items_per_page_label: 'Merkintöjä sivua kohti' items_per_page_options_all_label: '- Kaikki -' diff --git a/conf/cmi/language/fi/views.view.scheduler_scheduled_content.yml b/conf/cmi/language/fi/views.view.scheduler_scheduled_content.yml index 2f57f70a..0831eddd 100644 --- a/conf/cmi/language/fi/views.view.scheduler_scheduled_content.yml +++ b/conf/cmi/language/fi/views.view.scheduler_scheduled_content.yml @@ -49,6 +49,13 @@ display: langcode: expose: label: Kieli + pager: + options: + tags: + previous: Edellinen + next: Seuraava + first: Ensimmäinen + last: Viimeinen title: 'Ajastettu sisältö' empty: area_text_custom: @@ -60,13 +67,6 @@ display: exposed_sorts_label: Lajittele sort_asc_label: Nousevasti sort_desc_label: Laskevasti - pager: - options: - tags: - previous: '‹ edellinen' - next: 'seuraava ›' - first: '« ensimmäinen' - last: 'viimeinen »' display_title: Oletus overview: display_options: diff --git a/conf/cmi/language/fi/views.view.taxonomy_term.yml b/conf/cmi/language/fi/views.view.taxonomy_term.yml index 9b2ff883..fab4536a 100644 --- a/conf/cmi/language/fi/views.view.taxonomy_term.yml +++ b/conf/cmi/language/fi/views.view.taxonomy_term.yml @@ -7,8 +7,8 @@ display: pager: options: tags: - next: 'Seuraava ›' - previous: '‹ Edellinen' + next: Seuraava + previous: Edellinen expose: items_per_page_label: 'Merkintöjä sivua kohti' items_per_page_options_all_label: '- Kaikki -' diff --git a/conf/cmi/language/fi/views.view.tpr_errand_service_list.yml b/conf/cmi/language/fi/views.view.tpr_errand_service_list.yml index 9e9692fc..f84534e7 100644 --- a/conf/cmi/language/fi/views.view.tpr_errand_service_list.yml +++ b/conf/cmi/language/fi/views.view.tpr_errand_service_list.yml @@ -13,10 +13,10 @@ display: pager: options: tags: - previous: '‹ Edellinen' - next: 'Seuraava ›' - first: '« Ensimmäinen' - last: 'Viimeinen »' + previous: Edellinen + next: Seuraava + first: Ensimmäinen + last: Viimeinen expose: items_per_page_label: 'Merkintöjä sivua kohti' items_per_page_options_all_label: '- Kaikki -' diff --git a/conf/cmi/language/fi/views.view.tpr_service_channel_list.yml b/conf/cmi/language/fi/views.view.tpr_service_channel_list.yml index a6c44197..b3707a26 100644 --- a/conf/cmi/language/fi/views.view.tpr_service_channel_list.yml +++ b/conf/cmi/language/fi/views.view.tpr_service_channel_list.yml @@ -13,10 +13,10 @@ display: pager: options: tags: - previous: '‹ Edellinen' - next: 'Seuraava ›' - first: '« Ensimmäinen' - last: 'Viimeinen »' + previous: Edellinen + next: Seuraava + first: Ensimmäinen + last: Viimeinen expose: items_per_page_label: 'Merkintöjä sivua kohti' items_per_page_options_all_label: '- Kaikki -' diff --git a/conf/cmi/language/fi/views.view.tpr_service_list.yml b/conf/cmi/language/fi/views.view.tpr_service_list.yml index cab70f3e..fc9ee6af 100644 --- a/conf/cmi/language/fi/views.view.tpr_service_list.yml +++ b/conf/cmi/language/fi/views.view.tpr_service_list.yml @@ -13,10 +13,10 @@ display: pager: options: tags: - previous: '‹ Edellinen' - next: 'Seuraava ›' - first: '« Ensimmäinen' - last: 'Viimeinen »' + previous: Edellinen + next: Seuraava + first: Ensimmäinen + last: Viimeinen expose: items_per_page_label: 'Merkintöjä sivua kohti' items_per_page_options_all_label: '- Kaikki -' diff --git a/conf/cmi/language/fi/views.view.tpr_unit_list.yml b/conf/cmi/language/fi/views.view.tpr_unit_list.yml index d6726e3f..d81d0ddc 100644 --- a/conf/cmi/language/fi/views.view.tpr_unit_list.yml +++ b/conf/cmi/language/fi/views.view.tpr_unit_list.yml @@ -13,10 +13,10 @@ display: pager: options: tags: - previous: '‹ Edellinen' - next: 'Seuraava ›' - first: '« Ensimmäinen' - last: 'Viimeinen »' + previous: Edellinen + next: Seuraava + first: Ensimmäinen + last: Viimeinen expose: items_per_page_label: 'Merkintöjä sivua kohti' items_per_page_options_all_label: '- Kaikki -' diff --git a/conf/cmi/language/fi/views.view.user_admin_people.yml b/conf/cmi/language/fi/views.view.user_admin_people.yml index c4aacfc7..80f58748 100644 --- a/conf/cmi/language/fi/views.view.user_admin_people.yml +++ b/conf/cmi/language/fi/views.view.user_admin_people.yml @@ -30,10 +30,10 @@ display: pager: options: tags: - next: 'Seuraava ›' - previous: '‹ Edellinen' - first: '« Ensimmäinen' - last: 'Viimeinen »' + next: Seuraava + previous: Edellinen + first: Ensimmäinen + last: Viimeinen expose: items_per_page_label: 'Merkintöjä sivua kohti' items_per_page_options_all_label: '- Kaikki -' diff --git a/conf/cmi/language/sv/views.view.archive.yml b/conf/cmi/language/sv/views.view.archive.yml index 6699109f..35b91fae 100644 --- a/conf/cmi/language/sv/views.view.archive.yml +++ b/conf/cmi/language/sv/views.view.archive.yml @@ -8,8 +8,8 @@ display: pager: options: tags: - next: ›› - previous: ‹‹ + next: Nästa + previous: Föregående expose: items_per_page_label: 'Inlägg per sida' items_per_page_options_all_label: '- Alla -' diff --git a/conf/cmi/language/sv/views.view.content.yml b/conf/cmi/language/sv/views.view.content.yml index 61393d4d..11a7b349 100644 --- a/conf/cmi/language/sv/views.view.content.yml +++ b/conf/cmi/language/sv/views.view.content.yml @@ -13,10 +13,10 @@ display: name: label: Författare status: - label: Status settings: format_custom_false: 'Ej publicerad' format_custom_true: Publicerad + label: Status changed: label: Uppdaterad operations: @@ -25,10 +25,10 @@ display: pager: options: tags: - next: 'Nästa ›' - previous: '‹ Föregående' - first: '« Första' - last: 'Sista »' + next: Nästa + previous: Föregående + first: Första + last: Sista exposed_form: options: submit_button: Filtrera @@ -47,13 +47,15 @@ display: expose: label: Innehållstyp status: - expose: - label: Status group_info: label: 'Status för publicering' group_items: 1: title: Publicerad + 2: + title: 'Ej publicerad' + expose: + label: Status langcode: expose: label: Språk diff --git a/conf/cmi/language/sv/views.view.er_tpr_unit.yml b/conf/cmi/language/sv/views.view.er_tpr_unit.yml index 7aaa35fd..2bf7a890 100644 --- a/conf/cmi/language/sv/views.view.er_tpr_unit.yml +++ b/conf/cmi/language/sv/views.view.er_tpr_unit.yml @@ -9,8 +9,8 @@ display: items_per_page_options_all_label: '- Alla -' offset_label: Kompensera tags: - next: ›› - previous: ‹‹ + next: Nästa + previous: Föregående exposed_form: options: submit_button: Verkställ diff --git a/conf/cmi/language/sv/views.view.files.yml b/conf/cmi/language/sv/views.view.files.yml index ff2d56fd..3b285d01 100644 --- a/conf/cmi/language/sv/views.view.files.yml +++ b/conf/cmi/language/sv/views.view.files.yml @@ -14,8 +14,8 @@ display: pager: options: tags: - previous: '‹ Föregående' - next: 'Nästa ›' + previous: Föregående + next: Nästa expose: items_per_page_label: 'Inlägg per sida' items_per_page_options_all_label: '- Alla -' @@ -69,8 +69,8 @@ display: pager: options: tags: - previous: '‹ Föregående' - next: 'Nästa ›' + previous: Föregående + next: Nästa expose: items_per_page_label: 'Inlägg per sida' items_per_page_options_all_label: '- Alla -' diff --git a/conf/cmi/language/sv/views.view.glossary.yml b/conf/cmi/language/sv/views.view.glossary.yml index 7b112f02..a3b0a6d9 100644 --- a/conf/cmi/language/sv/views.view.glossary.yml +++ b/conf/cmi/language/sv/views.view.glossary.yml @@ -14,8 +14,8 @@ display: pager: options: tags: - next: ›› - previous: ‹‹ + next: Nästa + previous: Föregående expose: items_per_page_label: 'Inlägg per sida' items_per_page_options_all_label: '- Alla -' diff --git a/conf/cmi/language/sv/views.view.helfi_redirect.yml b/conf/cmi/language/sv/views.view.helfi_redirect.yml index de7deb5d..687d6835 100644 --- a/conf/cmi/language/sv/views.view.helfi_redirect.yml +++ b/conf/cmi/language/sv/views.view.helfi_redirect.yml @@ -1,71 +1,83 @@ -label: Omdirigera -description: 'Lista över omdirigeringar' display: default: - display_title: Förvald display_options: - title: Omdirigera - fields: - redirect_bulk_form: - action_title: 'Med urval' - redirect_source__path: - label: Från - separator: ', ' - is_custom: - label: Anpassad - separator: ', ' - created: - label: Skapad - status: - label: Publicerad - separator: ', ' - pager: - options: - tags: - next: 'nästa ›' - previous: '‹ föregående' - first: '« första' - last: 'sista »' - expose: - items_per_page_label: 'Inlägg per sida' - items_per_page_options_all_label: '- Alla -' - offset_label: Kompensera - exposed_form: - options: - submit_button: Filtrera - reset_button_label: Återställ - exposed_sorts_label: 'Sortera efter' - sort_asc_label: Stigande - sort_desc_label: Fallande - empty: - area_text_custom: - content: 'Det finns ingen omdirigering ännu.' filters: + status_code: + group_info: + group_items: + 1: + title: '300 Flera val' + 2: + title: '301 Flyttad permanent' + 3: + title: '302 Hittad' + 4: + title: '303 Se annan' + 5: + title: '304 Ej modifierad' + 6: + title: '305 Använd proxy' + 7: + title: '307 Tillfällig omdirigering' + label: Statuskod + expose: + label: Statuskod redirect_source__path: expose: label: Från redirect_redirect__uri: expose: label: Till - status_code: - expose: - label: Statuskod - group_info: - label: Statuskod - group_items: - 7: - title: '300 Multiple Choices' language: expose: - label: Ursprungsspråk + label: Originalspråk is_custom: expose: - label: Anpassad + label: Användarskapad status: expose: label: Publicerad + exposed_form: + options: + submit_button: Filtrera + reset_button_label: Återställ + exposed_sorts_label: 'Sortera efter' + sort_asc_label: Stigande + sort_desc_label: Fallande + pager: + options: + expose: + items_per_page_label: 'Inlägg per sida' + items_per_page_options_all_label: '- Alla -' + offset_label: Kompensera + tags: + previous: Föregående + next: Nästa + first: Första + last: Sista + fields: + redirect_bulk_form: + action_title: 'Med valda' + redirect_source__path: + label: Från + separator: ', ' + created: + label: Skapad + is_custom: + label: Användarskapad + separator: ', ' + status: + label: Publicerad + separator: ', ' + empty: + area_text_custom: + content: 'Det finns inga omdirigeringar ännu.' + title: Redirect + display_title: Förvald page_1: display_title: Sida display_options: menu: - title: Omdirigera + title: Redirect +label: Redirect +description: 'List of redirects' diff --git a/conf/cmi/language/sv/views.view.locked_content.yml b/conf/cmi/language/sv/views.view.locked_content.yml index 83dfa1e4..541df435 100644 --- a/conf/cmi/language/sv/views.view.locked_content.yml +++ b/conf/cmi/language/sv/views.view.locked_content.yml @@ -1,4 +1,3 @@ -label: 'Locked content' display: default: display_title: Förvald @@ -13,10 +12,10 @@ display: pager: options: tags: - previous: ‹‹ - next: ›› - first: '« Första' - last: 'Sista »' + previous: Föregående + next: Nästa + first: Första + last: Sista expose: items_per_page_label: 'Inlägg per sida' items_per_page_options_all_label: '- Alla -' @@ -31,7 +30,7 @@ display: label: Innehållstyp separator: ', ' name: - label: 'Lock owner' + label: 'Lås ägare' separator: ', ' operations: label: Funktioner @@ -44,15 +43,16 @@ display: group_items: 1: title: Publicerad - type: - expose: - label: Innehållstyp title: expose: label: Titel - title: 'Locked content' + type: + expose: + label: Innehållstyp + title: 'Låst innehåll' page_1: display_title: Sida display_options: menu: - title: 'Locked content' + title: 'Låst innehåll' +label: 'Låst innehåll' diff --git a/conf/cmi/language/sv/views.view.locked_services.yml b/conf/cmi/language/sv/views.view.locked_services.yml index 76ae533b..ab9fea82 100644 --- a/conf/cmi/language/sv/views.view.locked_services.yml +++ b/conf/cmi/language/sv/views.view.locked_services.yml @@ -10,7 +10,7 @@ display: label: Titel separator: ', ' name_1: - label: 'Lock owner' + label: 'Lås ägare' separator: ', ' langcode: label: 'Content language' @@ -20,10 +20,10 @@ display: pager: options: tags: - next: 'Nästa ›' - previous: '‹ Föregående' - first: '« Första' - last: 'Sista »' + next: Nästa + previous: Föregående + first: Första + last: Sista expose: items_per_page_label: 'Inlägg per sida' items_per_page_options_all_label: '- Alla -' diff --git a/conf/cmi/language/sv/views.view.locked_units.yml b/conf/cmi/language/sv/views.view.locked_units.yml index c53e1ef4..aa954ab4 100644 --- a/conf/cmi/language/sv/views.view.locked_units.yml +++ b/conf/cmi/language/sv/views.view.locked_units.yml @@ -10,7 +10,7 @@ display: label: Titel separator: ', ' name_1: - label: 'Lock owner' + label: 'Lås ägare' separator: ', ' langcode: label: 'Content language' @@ -20,10 +20,10 @@ display: pager: options: tags: - next: 'Nästa ›' - previous: '‹ Föregående' - first: '« Första' - last: 'Sista »' + next: Nästa + previous: Föregående + first: Första + last: Sista expose: items_per_page_label: 'Inlägg per sida' items_per_page_options_all_label: '- Alla -' diff --git a/conf/cmi/language/sv/views.view.media.yml b/conf/cmi/language/sv/views.view.media.yml index 1ad05ea4..3fe9b899 100644 --- a/conf/cmi/language/sv/views.view.media.yml +++ b/conf/cmi/language/sv/views.view.media.yml @@ -32,10 +32,10 @@ display: pager: options: tags: - next: 'Nästa ›' - previous: '‹ Föregående' - first: '« Första' - last: 'Sista »' + next: Nästa + previous: Föregående + first: Första + last: Sista expose: items_per_page_label: 'Inlägg per sida' items_per_page_options_all_label: '- Alla -' diff --git a/conf/cmi/language/sv/views.view.media_library.yml b/conf/cmi/language/sv/views.view.media_library.yml index 0370700e..7f95d439 100644 --- a/conf/cmi/language/sv/views.view.media_library.yml +++ b/conf/cmi/language/sv/views.view.media_library.yml @@ -8,13 +8,13 @@ display: action_title: Åtgärd pager: options: + tags: + next: Nästa + previous: Föregående expose: items_per_page_label: 'Inlägg per sida' items_per_page_options_all_label: '- Alla -' offset_label: Kompensera - tags: - next: ›› - previous: ‹‹ exposed_form: options: submit_button: 'Tillämpa filter' @@ -44,6 +44,8 @@ display: group_items: 1: title: Publicerad + 2: + title: 'Ej publicerad' name: expose: label: Namn diff --git a/conf/cmi/language/sv/views.view.paragraphs_library.yml b/conf/cmi/language/sv/views.view.paragraphs_library.yml index 43c1c0c1..82509c65 100644 --- a/conf/cmi/language/sv/views.view.paragraphs_library.yml +++ b/conf/cmi/language/sv/views.view.paragraphs_library.yml @@ -12,8 +12,8 @@ display: pager: options: tags: - previous: ‹‹ - next: ›› + previous: Föregående + next: Nästa expose: items_per_page_label: 'Inlägg per sida' items_per_page_options_all_label: '- Alla -' diff --git a/conf/cmi/language/sv/views.view.redirect.yml b/conf/cmi/language/sv/views.view.redirect.yml index 68be3634..75e1656f 100644 --- a/conf/cmi/language/sv/views.view.redirect.yml +++ b/conf/cmi/language/sv/views.view.redirect.yml @@ -1,5 +1,5 @@ -label: Omdirigera -description: 'Lista över omdirigeringar' +label: Redirect +description: 'List of redirects' display: default: display_title: Förvald @@ -14,17 +14,17 @@ display: pager: options: tags: - previous: '‹ föregående' - next: 'nästa ›' - first: '« första' - last: 'sista »' + previous: Föregående + next: Nästa + first: Första + last: Sista expose: items_per_page_label: 'Inlägg per sida' items_per_page_options_all_label: '- Alla -' offset_label: Kompensera fields: redirect_bulk_form: - action_title: 'Med urval' + action_title: 'Med valda' redirect_source__path: label: Från separator: ', ' @@ -44,13 +44,25 @@ display: label: Statuskod group_items: 7: - title: '300 Multiple Choices' + title: '307 Tillfällig omdirigering' + 1: + title: '300 Flera val' + 2: + title: '301 Flyttad permanent' + 3: + title: '302 Hittad' + 4: + title: '303 Se annan' + 5: + title: '304 Ej modifierad' + 6: + title: '305 Använd proxy' language: expose: - label: Ursprungsspråk - title: Omdirigera + label: Originalspråk + title: Redirect empty: area_text_custom: - content: 'Det finns ingen omdirigering ännu.' + content: 'Det finns inga omdirigeringar ännu.' page_1: display_title: Sida diff --git a/conf/cmi/language/sv/views.view.scheduler_scheduled_content.yml b/conf/cmi/language/sv/views.view.scheduler_scheduled_content.yml index 1104311a..45a83e65 100644 --- a/conf/cmi/language/sv/views.view.scheduler_scheduled_content.yml +++ b/conf/cmi/language/sv/views.view.scheduler_scheduled_content.yml @@ -14,10 +14,10 @@ display: label: Författare separator: ', ' status: - label: Status settings: format_custom_true: Publicerad format_custom_false: 'Ej publicerad' + label: Status separator: ', ' publish_on: label: 'Publicera den' @@ -35,8 +35,6 @@ display: expose: label: Innehållstyp status: - expose: - label: Status group_info: label: 'Status för publicering' group_items: @@ -44,6 +42,8 @@ display: title: Publicerad 2: title: 'Ej publicerad' + expose: + label: Status langcode: expose: label: Språk @@ -57,10 +57,10 @@ display: pager: options: tags: - previous: '‹ föregående' - next: 'nästa ›' - first: '« första' - last: 'sista »' + previous: Föregående + next: Nästa + first: Första + last: Sista title: 'Schemalagt innehåll' empty: area_text_custom: diff --git a/conf/cmi/language/sv/views.view.taxonomy_term.yml b/conf/cmi/language/sv/views.view.taxonomy_term.yml index 10192b88..2f3e63b6 100644 --- a/conf/cmi/language/sv/views.view.taxonomy_term.yml +++ b/conf/cmi/language/sv/views.view.taxonomy_term.yml @@ -7,8 +7,8 @@ display: pager: options: tags: - next: ›› - previous: ‹‹ + next: Nästa + previous: Föregående expose: items_per_page_label: 'Inlägg per sida' items_per_page_options_all_label: '- Alla -' diff --git a/conf/cmi/language/sv/views.view.tpr_errand_service_list.yml b/conf/cmi/language/sv/views.view.tpr_errand_service_list.yml index 9ea0cc18..7705ac5d 100644 --- a/conf/cmi/language/sv/views.view.tpr_errand_service_list.yml +++ b/conf/cmi/language/sv/views.view.tpr_errand_service_list.yml @@ -12,10 +12,10 @@ display: pager: options: tags: - first: '« Första' - last: 'Sista »' - previous: ‹‹ - next: ›› + first: Första + last: Sista + previous: Föregående + next: Nästa expose: items_per_page_label: 'Inlägg per sida' items_per_page_options_all_label: '- Alla -' diff --git a/conf/cmi/language/sv/views.view.tpr_service_channel_list.yml b/conf/cmi/language/sv/views.view.tpr_service_channel_list.yml index 943057f7..6f6ffa69 100644 --- a/conf/cmi/language/sv/views.view.tpr_service_channel_list.yml +++ b/conf/cmi/language/sv/views.view.tpr_service_channel_list.yml @@ -12,10 +12,10 @@ display: pager: options: tags: - first: '« Första' - last: 'Sista »' - previous: ‹‹ - next: ›› + first: Första + last: Sista + previous: Föregående + next: Nästa expose: items_per_page_label: 'Inlägg per sida' items_per_page_options_all_label: '- Alla -' diff --git a/conf/cmi/language/sv/views.view.tpr_service_list.yml b/conf/cmi/language/sv/views.view.tpr_service_list.yml index 668c10f7..1604ec2a 100644 --- a/conf/cmi/language/sv/views.view.tpr_service_list.yml +++ b/conf/cmi/language/sv/views.view.tpr_service_list.yml @@ -12,10 +12,10 @@ display: pager: options: tags: - first: '« Första' - last: 'Sista »' - previous: ‹‹ - next: ›› + first: Första + last: Sista + previous: Föregående + next: Nästa expose: items_per_page_label: 'Inlägg per sida' items_per_page_options_all_label: '- Alla -' diff --git a/conf/cmi/language/sv/views.view.tpr_unit_list.yml b/conf/cmi/language/sv/views.view.tpr_unit_list.yml index 3b040122..07eae89e 100644 --- a/conf/cmi/language/sv/views.view.tpr_unit_list.yml +++ b/conf/cmi/language/sv/views.view.tpr_unit_list.yml @@ -13,10 +13,10 @@ display: pager: options: tags: - first: '« Första' - last: 'Sista »' - previous: ‹‹ - next: ›› + first: Första + last: Sista + previous: Föregående + next: Nästa expose: items_per_page_label: 'Inlägg per sida' items_per_page_options_all_label: '- Alla -' diff --git a/conf/cmi/language/sv/views.view.user_admin_people.yml b/conf/cmi/language/sv/views.view.user_admin_people.yml index 2a355974..1a06e563 100644 --- a/conf/cmi/language/sv/views.view.user_admin_people.yml +++ b/conf/cmi/language/sv/views.view.user_admin_people.yml @@ -34,10 +34,10 @@ display: pager: options: tags: - next: 'Nästa ›' - previous: '‹ Föregående' - first: '« Första' - last: 'Sista »' + next: Nästa + previous: Föregående + first: Första + last: Sista expose: items_per_page_label: 'Inlägg per sida' items_per_page_options_all_label: '- Alla -' diff --git a/conf/cmi/views.view.content.yml b/conf/cmi/views.view.content.yml index a53fc692..86a84bb1 100644 --- a/conf/cmi/views.view.content.yml +++ b/conf/cmi/views.view.content.yml @@ -318,10 +318,10 @@ display: pagination_heading_level: h4 items_per_page: 50 tags: - next: 'Next ›' - previous: '‹ Previous' - first: '« First' - last: 'Last »' + next: Next + previous: Previous + first: First + last: Last exposed_form: type: basic options: @@ -377,8 +377,6 @@ display: multiple: false remember_roles: authenticated: authenticated - anonymous: '0' - administrator: '0' is_grouped: false group_info: label: '' @@ -419,8 +417,6 @@ display: multiple: false remember_roles: authenticated: authenticated - anonymous: '0' - administrator: '0' reduce: false is_grouped: false group_info: @@ -474,11 +470,11 @@ display: default_group: All default_group_multiple: { } group_items: - - + 1: title: Published operator: '=' value: '1' - - + 2: title: Unpublished operator: '=' value: '0' @@ -513,9 +509,6 @@ display: multiple: false remember_roles: authenticated: authenticated - anonymous: '0' - admin: '0' - content_producer: '0' reduce: true is_grouped: false group_info: @@ -544,7 +537,7 @@ display: filter_groups: operator: AND groups: - - AND + 1: AND style: type: table options: diff --git a/conf/cmi/views.view.er_tpr_unit.yml b/conf/cmi/views.view.er_tpr_unit.yml index f12ee5c5..718471df 100644 --- a/conf/cmi/views.view.er_tpr_unit.yml +++ b/conf/cmi/views.view.er_tpr_unit.yml @@ -6,7 +6,7 @@ dependencies: - helfi_tpr - user _core: - default_config_hash: XvItl9zF-dUj3C53FT6DsrPnrWfvPCy5IZYsdoXew7U + default_config_hash: xQTb_j-YlLPQwNO2XMGCrBrq-ugsswFVJm555d3I_5k id: er_tpr_unit label: 'Entity reference - TPR Unit' module: views @@ -91,13 +91,12 @@ display: type: mini options: offset: 0 - pagination_heading_level: h4 items_per_page: 10 total_pages: null id: 0 tags: - next: ›› - previous: ‹‹ + next: Next + previous: Previous expose: items_per_page: false items_per_page_label: 'Items per page' @@ -106,6 +105,7 @@ display: items_per_page_options_all_label: '- All -' offset: false offset_label: Offset + pagination_heading_level: h4 exposed_form: type: basic options: diff --git a/conf/cmi/views.view.helfi_redirect.yml b/conf/cmi/views.view.helfi_redirect.yml index cb34781c..1cbff5a7 100644 --- a/conf/cmi/views.view.helfi_redirect.yml +++ b/conf/cmi/views.view.helfi_redirect.yml @@ -9,7 +9,7 @@ dependencies: - redirect - user _core: - default_config_hash: T8ZZY-2rwfH9QPXho30lLjOnPsWsLzhy6YGOTix228k + default_config_hash: tH9tiLAhaR2LdCQkjUf5FTsU-8Adc_4pBxrNJPtBKL4 id: helfi_redirect label: Redirect module: views @@ -367,10 +367,10 @@ display: total_pages: null id: 0 tags: - next: 'next ›' - previous: '‹ previous' - first: '« first' - last: 'last »' + next: Next + previous: Previous + first: First + last: Last expose: items_per_page: false items_per_page_label: 'Items per page' diff --git a/conf/cmi/views.view.locked_content.yml b/conf/cmi/views.view.locked_content.yml index d7774382..ec2dd01b 100644 --- a/conf/cmi/views.view.locked_content.yml +++ b/conf/cmi/views.view.locked_content.yml @@ -439,10 +439,10 @@ display: total_pages: null id: 0 tags: - next: ›› - previous: ‹‹ - first: '« First' - last: 'Last »' + next: Next + previous: Previous + first: First + last: Last expose: items_per_page: false items_per_page_label: 'Items per page' diff --git a/conf/cmi/views.view.locked_services.yml b/conf/cmi/views.view.locked_services.yml index aa17491f..cc8f0814 100644 --- a/conf/cmi/views.view.locked_services.yml +++ b/conf/cmi/views.view.locked_services.yml @@ -7,7 +7,7 @@ dependencies: - helfi_tpr - user _core: - default_config_hash: 5d0haVUeS4PdeswmDM70yzvx0GY5-QeA2qfjzbW-FXM + default_config_hash: aWWCfu_BLTqXUnVK428-5vmOLyDFaF5vc_wSCogl_CU id: locked_services label: 'Locked services' module: views @@ -381,15 +381,14 @@ display: type: full options: offset: 0 - pagination_heading_level: h4 items_per_page: 50 total_pages: null id: 0 tags: - next: 'Next ›' - previous: '‹ Previous' - first: '« First' - last: 'Last »' + next: Next + previous: Previous + first: First + last: Last expose: items_per_page: false items_per_page_label: 'Items per page' @@ -399,6 +398,7 @@ display: offset: false offset_label: Offset quantity: 9 + pagination_heading_level: h4 exposed_form: type: basic options: diff --git a/conf/cmi/views.view.locked_units.yml b/conf/cmi/views.view.locked_units.yml index 8ea1d1bd..ab35d997 100644 --- a/conf/cmi/views.view.locked_units.yml +++ b/conf/cmi/views.view.locked_units.yml @@ -7,7 +7,7 @@ dependencies: - helfi_tpr - user _core: - default_config_hash: 0hlcjVvL7vdLtkyp8OVSiK8ue6rkEHayXkv5S316yTY + default_config_hash: 2RwuySoO0jIj7tuWxKcXUsKZnepI9xt3yhSIYXiBQe8 id: locked_units label: 'Locked units' module: views @@ -381,15 +381,14 @@ display: type: full options: offset: 0 - pagination_heading_level: h4 items_per_page: 50 total_pages: null id: 0 tags: - next: 'Next ›' - previous: '‹ Previous' - first: '« First' - last: 'Last »' + next: Next + previous: Previous + first: First + last: Last expose: items_per_page: false items_per_page_label: 'Items per page' @@ -399,6 +398,7 @@ display: offset: false offset_label: Offset quantity: 9 + pagination_heading_level: h4 exposed_form: type: basic options: diff --git a/conf/cmi/views.view.media_library.yml b/conf/cmi/views.view.media_library.yml index 438e8ac5..055a57f8 100644 --- a/conf/cmi/views.view.media_library.yml +++ b/conf/cmi/views.view.media_library.yml @@ -144,8 +144,8 @@ display: total_pages: null id: 0 tags: - next: ›› - previous: ‹‹ + next: Next + previous: Previous expose: items_per_page: false items_per_page_label: 'Items per page' @@ -271,11 +271,11 @@ display: default_group: All default_group_multiple: { } group_items: - - + 1: title: Published operator: '=' value: '1' - - + 2: title: Unpublished operator: '=' value: '0' @@ -477,13 +477,13 @@ display: cache_metadata: max-age: 0 contexts: + - 'languages:language_content' - 'languages:language_interface' - url - url.query_args - 'url.query_args:sort_by' - user - user.permissions - - 'languages:language_content' tags: { } page: id: page @@ -1083,10 +1083,10 @@ display: total_pages: null id: 0 tags: - next: ›› - previous: ‹‹ - first: '« First' - last: 'Last »' + next: Next + previous: Previous + first: First + last: Last expose: items_per_page: false items_per_page_label: 'Items per page' diff --git a/conf/cmi/views.view.scheduler_scheduled_content.yml b/conf/cmi/views.view.scheduler_scheduled_content.yml index 5adc074c..22e0e0f2 100644 --- a/conf/cmi/views.view.scheduler_scheduled_content.yml +++ b/conf/cmi/views.view.scheduler_scheduled_content.yml @@ -2,8 +2,6 @@ uuid: 59a3ae5d-40e7-43f3-916d-e533a8b60577 langcode: en status: true dependencies: - config: - - system.menu.admin module: - node - scheduler @@ -20,7 +18,7 @@ base_field: vid display: default: id: default - display_title: Master + display_title: Default display_plugin: default position: 0 display_options: @@ -535,10 +533,10 @@ display: total_pages: null id: 0 tags: - next: 'next ›' - previous: '‹ previous' - first: '« first' - last: 'last »' + next: Next + previous: Previous + first: First + last: Last exposed_form: type: basic options: @@ -723,8 +721,8 @@ display: remember: false multiple: false remember_roles: - anonymous: '0' authenticated: '0' + anonymous: '0' administrator: '0' is_grouped: true group_info: diff --git a/conf/cmi/views.view.service_list.yml b/conf/cmi/views.view.service_list.yml index e0d9d02a..746f7477 100644 --- a/conf/cmi/views.view.service_list.yml +++ b/conf/cmi/views.view.service_list.yml @@ -109,7 +109,6 @@ display: type: full options: offset: 0 - pagination_heading_level: h4 items_per_page: 4 total_pages: null id: 0 @@ -127,6 +126,7 @@ display: offset: false offset_label: Offset quantity: 9 + pagination_heading_level: h4 exposed_form: type: basic options: @@ -646,7 +646,6 @@ display: type: full options: offset: 0 - pagination_heading_level: h4 items_per_page: 5 total_pages: null id: 0 @@ -664,6 +663,7 @@ display: offset: false offset_label: Offset quantity: 9 + pagination_heading_level: h4 exposed_form: type: basic options: diff --git a/conf/cmi/views.view.service_units.yml b/conf/cmi/views.view.service_units.yml index 85678618..1f74d3c3 100644 --- a/conf/cmi/views.view.service_units.yml +++ b/conf/cmi/views.view.service_units.yml @@ -93,7 +93,6 @@ display: type: full options: offset: 0 - pagination_heading_level: h4 items_per_page: 8 total_pages: null id: 0 @@ -111,6 +110,7 @@ display: offset: false offset_label: Offset quantity: 9 + pagination_heading_level: h4 exposed_form: type: basic options: diff --git a/conf/cmi/views.view.tpr_errand_service_list.yml b/conf/cmi/views.view.tpr_errand_service_list.yml index 2ac7a027..9b5ea241 100644 --- a/conf/cmi/views.view.tpr_errand_service_list.yml +++ b/conf/cmi/views.view.tpr_errand_service_list.yml @@ -475,10 +475,10 @@ display: total_pages: null id: 0 tags: - next: ›› - previous: ‹‹ - first: '« First' - last: 'Last »' + next: Next + previous: Previous + first: First + last: Last expose: items_per_page: false items_per_page_label: 'Items per page' diff --git a/conf/cmi/views.view.tpr_service_channel_list.yml b/conf/cmi/views.view.tpr_service_channel_list.yml index d2d0e448..6eddda16 100644 --- a/conf/cmi/views.view.tpr_service_channel_list.yml +++ b/conf/cmi/views.view.tpr_service_channel_list.yml @@ -475,10 +475,10 @@ display: total_pages: null id: 0 tags: - next: ›› - previous: ‹‹ - first: '« First' - last: 'Last »' + next: Next + previous: Previous + first: First + last: Last expose: items_per_page: false items_per_page_label: 'Items per page' diff --git a/conf/cmi/views.view.tpr_service_list.yml b/conf/cmi/views.view.tpr_service_list.yml index db8a552f..e3ed6b7c 100644 --- a/conf/cmi/views.view.tpr_service_list.yml +++ b/conf/cmi/views.view.tpr_service_list.yml @@ -475,10 +475,10 @@ display: total_pages: null id: 0 tags: - next: ›› - previous: ‹‹ - first: '« First' - last: 'Last »' + next: Next + previous: Previous + first: First + last: Last expose: items_per_page: false items_per_page_label: 'Items per page' diff --git a/conf/cmi/views.view.tpr_unit_list.yml b/conf/cmi/views.view.tpr_unit_list.yml index 8576f11a..e56815c7 100644 --- a/conf/cmi/views.view.tpr_unit_list.yml +++ b/conf/cmi/views.view.tpr_unit_list.yml @@ -507,10 +507,10 @@ display: total_pages: null id: 0 tags: - next: ›› - previous: ‹‹ - first: '« First' - last: 'Last »' + next: Next + previous: Previous + first: First + last: Last expose: items_per_page: false items_per_page_label: 'Items per page' diff --git a/conf/cmi/views.view.unit_search.yml b/conf/cmi/views.view.unit_search.yml index 38c913d8..91cf0ae6 100644 --- a/conf/cmi/views.view.unit_search.yml +++ b/conf/cmi/views.view.unit_search.yml @@ -286,7 +286,6 @@ display: type: full options: offset: 0 - pagination_heading_level: h4 items_per_page: 15 total_pages: null id: 0 @@ -304,6 +303,7 @@ display: offset: false offset_label: Offset quantity: 9 + pagination_heading_level: h4 exposed_form: type: basic options: diff --git a/tools/commit-msg b/tools/commit-msg old mode 100755 new mode 100644 diff --git a/tools/make/Makefile b/tools/make/Makefile deleted file mode 100644 index fa000889..00000000 --- a/tools/make/Makefile +++ /dev/null @@ -1,46 +0,0 @@ -.DEFAULT_GOAL := help - -BUILD_TARGETS := -COMPOSER_JSON_PATH ?= . -DRUIDFI_TOOLS_MAKE_DIR := $(dir $(lastword $(MAKEFILE_LIST))) -ENV := dev -PACKAGE_JSON_PATH ?= . -RUN_ON := host -UNAME_S := $(shell uname -s) -# Shorten with https://git.io/ : https://raw.githubusercontent.com/druidfi/tools/main/update.sh -UPDATE_SCRIPT_URL := https://git.io/JP10q -WEBROOT ?= public - -include $(DRUIDFI_TOOLS_MAKE_DIR)utils.mk - -# Include druidfi/tools make files -include $(DRUIDFI_TOOLS_MAKE_DIR)include.mk - -PHONY += debug -debug: ## Show debug information - @printf "\n$(YELLOW)Debug starts:$(NO_COLOR)\n\n" - $(call dbg,DOCKER,$(call has,docker)) - $(call dbg,DOCKER_PROJECT_ROOT,$(DOCKER_PROJECT_ROOT)) - $(call dbg,DOCKER_COMPOSE_YML_EXISTS,$(DOCKER_COMPOSE_YML_EXISTS)) - $(call dbg,CLI_SERVICE,$(CLI_SERVICE)) - $(call dbg,CLI_USER,$(if $(CLI_USER),$(CLI_USER),default user from CLI image)) - $(call dbg,CLI_SHELL,${CLI_SHELL}) - $(call dbg,ENV,${ENV}) - $(call dbg,PHP on host,$(call has,php)) - $(call dbg,PHP_BIN,$(shell command -v php || echo no)) - $(call dbg,RUN_ON,${RUN_ON}) - $(call dbg,Composer on host,$(call has,composer)) - $(call dbg,COMPOSER_BIN,$(shell command -v composer || echo no)) - $(call dbg,COMPOSER_JSON_EXISTS,${COMPOSER_JSON_EXISTS}) - $(call dbg,IS_DRUPAL,${IS_DRUPAL}) - $(call dbg,IS_SYMFONY,${IS_SYMFONY}) - $(call dbg,LAGOON,${LAGOON}) - $(call dbg,SYSTEM,${SYSTEM}) - $(call dbg,WEBROOT,${WEBROOT}) - $(call dbg,UNAME_S,${UNAME_S}) -ifeq ($(RUN_ON),docker) - @printf "\n${YELLOW}Assumption: We should run on Docker and not on host${NO_COLOR}\n" -else - @printf "\n${YELLOW}Assumption: We should run on host and not on Docker${NO_COLOR}\n" -endif - @printf "\n${GREEN}End of debug.${NO_COLOR}\n" diff --git a/tools/make/ansible.mk b/tools/make/ansible.mk deleted file mode 100644 index 132f84c1..00000000 --- a/tools/make/ansible.mk +++ /dev/null @@ -1,35 +0,0 @@ -ANSIBLE_ROLES_PATH ?= ansible/roles -ANSIBLE_CHECK_ROLE ?= geerlingguy.docker -ANSIBLE_PLAYBOOK ?= ansible-playbook -ANSIBLE_PROVISION ?= ansible/provision.yml -ANSIBLE_REQUIREMENTS ?= ansible/requirements.yml -ANSIBLE_FLAGS ?= - -PHONY += provision -provision: $(ANSIBLE_ROLES_PATH)/$(ANSIBLE_CHECK_ROLE) ## Make provisioning - $(call step,Ansible: Make dry run on provisioning...\n) - @$(ANSIBLE_PLAYBOOK) $(ANSIBLE_PROVISION) $(ANSIBLE_FLAGS) - -PHONY += provision-% -provision-%: $(ANSIBLE_ROLES_PATH)/$(ANSIBLE_CHECK_ROLE) ## Make provisioning by tag - $(call step,Ansible: Make provisioning by tag "$*"...\n) - @$(ANSIBLE_PLAYBOOK) $(ANSIBLE_PROVISION) --tags="$*" $(ANSIBLE_FLAGS) - -PHONY += provision-dry-run -provision-dry-run: $(ANSIBLE_ROLES_PATH)/$(ANSIBLE_CHECK_ROLE) ## Make dry run on provisioning - $(call step,Ansible: Make dry run on provisioning...\n) - @$(ANSIBLE_PLAYBOOK) $(ANSIBLE_PROVISION) $(ANSIBLE_FLAGS) --check - -PHONY += ansible-install-roles -ansible-install-roles: ## Install Ansible roles - $(call step,Ansible: Install Ansible roles...\n) - @ansible-galaxy install -r $(ANSIBLE_REQUIREMENTS) -p $(ANSIBLE_ROLES_PATH) - -PHONY += ansible-update-roles -ansible-update-roles: ## Update Ansible roles - $(call step,Ansible: Update Ansible roles...\n) - @ansible-galaxy remove --roles-path=$(ANSIBLE_ROLES_PATH) $(shell find $(ANSIBLE_ROLES_PATH) -mindepth 1 -maxdepth 1 -type d -exec basename {} \;) || true - @ansible-galaxy install --force-with-deps --role-file=$(ANSIBLE_REQUIREMENTS) --roles-path=$(ANSIBLE_ROLES_PATH) - -$(ANSIBLE_ROLES_PATH)/$(ANSIBLE_CHECK_ROLE): - @$(MAKE) ansible-install-roles diff --git a/tools/make/common.mk b/tools/make/common.mk deleted file mode 100644 index 0ede4457..00000000 --- a/tools/make/common.mk +++ /dev/null @@ -1,75 +0,0 @@ -ARTIFACT_INCLUDE_EXISTS := $(shell test -f conf/artifact/include && echo yes || echo no) -ARTIFACT_EXCLUDE_EXISTS := $(shell test -f conf/artifact/exclude && echo yes || echo no) -ARTIFACT_CMD := tar -hczf artifact.tar.gz -DUMP_SQL_FILENAME ?= dump.sql -DUMP_SQL_EXISTS := $(shell test -f $(DUMP_SQL_FILENAME) && echo yes || echo no) -SSH_OPTS ?= -o LogLevel=ERROR -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -CLEAN_EXCLUDE := .idea $(DUMP_SQL_FILENAME) .env.local - -ifeq ($(ARTIFACT_EXCLUDE_EXISTS),yes) - ARTIFACT_CMD := $(ARTIFACT_CMD) --exclude-from=conf/artifact/exclude -endif - -ifeq ($(ARTIFACT_INCLUDE_EXISTS),yes) - ARTIFACT_CMD := $(ARTIFACT_CMD) --files-from=conf/artifact/include -else - ARTIFACT_CMD := $(ARTIFACT_CMD) * -endif - -PHONY += artifact -# This command can always be run on host -artifact: RUN_ON := host -artifact: ## Make tar.gz package from the current build - $(call step,Create artifact...\n) - @$(ARTIFACT_CMD) - -PHONY += build -build: ## Build codebase(s) - $(call group_step,Build ($(ENV)):${NO_COLOR} $(BUILD_TARGETS)) - @$(MAKE) $(BUILD_TARGETS) ENV=$(ENV) - -PHONY += build-dev -build-dev: build - -PHONY += build-testing -build-testing: - @$(MAKE) build ENV=testing - -PHONY += build-production -build-production: - @$(MAKE) build ENV=production - -PHONY += clean -clean: ## Cleanup - $(call step,Cleanup loaded files...\n) - @rm -rf vendor - @git clean -fdx $(foreach item,$(CLEAN_EXCLUDE),-e $(item)) - -PHONY += self-update -self-update: ## Self-update makefiles from druidfi/tools - $(call step,Update makefiles from druidfi/tools\n) - @bash -c "$$(curl -fsSL $(UPDATE_SCRIPT_URL))" - -PHONY += shell-% -shell-%: OPTS = $(INSTANCE_$*_OPTS) -shell-%: USER = $(INSTANCE_$*_USER) -shell-%: HOST = $(INSTANCE_$*_HOST) -shell-%: EXTRA = $(INSTANCE_$*_EXTRA) -shell-%: ## Login to remote instance - ssh $(OPTS) $(USER)@$(HOST) $(EXTRA) - -PHONY += sync -sync: ## Sync data from other environments - $(call group_step,Sync:$(NO_COLOR) $(SYNC_TARGETS)) - @$(MAKE) $(SYNC_TARGETS) ENV=$(ENV) - -PHONY += gh-download-dump -gh-download-dump: GH_FLAGS += $(if $(GH_ARTIFACT),-n $(GH_ARTIFACT),-n latest-dump) -gh-download-dump: GH_FLAGS += $(if $(GH_REPO),-R $(GH_REPO),) -gh-download-dump: ## Download database dump from repository artifacts - $(call step,Download database dump from repository artifacts\n) -ifeq ($(DUMP_SQL_EXISTS),no) - $(call run,gh run download $(strip $(GH_FLAGS)),Downloaded $(DUMP_SQL_FILENAME),Failed) -else - @echo "There is already $(DUMP_SQL_FILENAME)" -endif diff --git a/tools/make/composer.mk b/tools/make/composer.mk index 4dd21954..1e61b280 100644 --- a/tools/make/composer.mk +++ b/tools/make/composer.mk @@ -1,11 +1,3 @@ -BUILD_TARGETS += composer-install -COMPOSER_PROD_FLAGS := --no-dev --optimize-autoloader --prefer-dist - -PHONY += composer-info -composer-info: ## Composer info - $(call step,Do Composer info...\n) - $(call composer,info) - PHONY += composer-update composer-update: ## Update Composer packages $(call step,Do Composer update...\n) @@ -14,19 +6,13 @@ composer-update: ## Update Composer packages PHONY += composer-install composer-install: ## Install Composer packages $(call step,Do Composer install...\n) - $(call composer,install$(if $(filter production,$(ENV)), $(COMPOSER_PROD_FLAGS),)) + $(call composer,install) PHONY += composer-outdated composer-outdated: ## Show outdated Composer packages $(call step,Show outdated Composer packages...\n) $(call composer,outdated --direct) -ifeq ($(RUN_ON),docker) -define composer - $(call docker_compose_exec,composer --ansi$(if $(filter $(COMPOSER_JSON_PATH),.),, --working-dir=$(COMPOSER_JSON_PATH)) $(1)) -endef -else define composer - @composer --ansi$(if $(filter $(COMPOSER_JSON_PATH),.),, --working-dir=$(COMPOSER_JSON_PATH)) $(1) + $(call docker_compose_exec,composer $(1)) endef -endif diff --git a/tools/make/docker.mk b/tools/make/docker.mk index 4367e2df..5fd10595 100644 --- a/tools/make/docker.mk +++ b/tools/make/docker.mk @@ -1,26 +1,3 @@ -CLI_SERVICE := app -CLI_SHELL := sh -# Note: specification says this file would be compose.yaml -DOCKER_COMPOSE_YML_PATH ?= compose.yaml -DOCKER_COMPOSE_YML_EXISTS := $(shell test -f $(DOCKER_COMPOSE_YML_PATH) && echo yes || echo no) -DOCKER_ENV := $(shell test -f /.dockerenv && echo yes || echo no) -DOCKER_PROJECT_ROOT ?= /app -DOCKER_WARNING_INSIDE := You are inside the Docker container! - -ifeq ($(DOCKER_ENV),yes) - RUN_ON := host -endif - -# If compose.yaml exists -ifeq ($(DOCKER_ENV)-$(DOCKER_COMPOSE_YML_EXISTS),no-yes) - RUN_ON := docker -endif - -PHONY += config -config: ## Show docker-compose config - $(call step,Show Docker Compose config...\n) - $(call docker_compose,config) - PHONY += pull pull: ## Pull docker images $(call step,Pull the latest docker images...\n) @@ -48,43 +25,13 @@ up: ## Launch the environment PHONY += shell shell: ## Login to CLI container -ifeq ($(RUN_ON),docker) - $(call docker_compose,exec $(CLI_SERVICE) $(CLI_SHELL)) -else - $(call warn,$(DOCKER_WARNING_INSIDE)) -endif + $(call docker_compose,exec app bash) -PHONY += ssh-check -ssh-check: ## Check SSH keys on CLI container - $(call docker_compose_exec,ssh-add -L) - -ifeq ($(RUN_ON),docker) -define docker - @docker $(1) > /dev/null 2>&1 && $(if $(2),echo "$(2)",) -endef -else -define docker - $(call sub_step,$(DOCKER_WARNING_INSIDE)) -endef -endif - -ifeq ($(RUN_ON),docker) -define docker_compose_exec - $(call docker_compose,exec$(if $(CLI_USER), -u $(CLI_USER),) $(CLI_SERVICE) $(CLI_SHELL) -c "$(1)") - $(if $(2),@echo "$(2)",) -endef -else define docker_compose_exec - @$(1) && echo $(2) + $(call docker_compose,exec app bash -c "$(1)") endef -endif -ifeq ($(RUN_ON),docker) define docker_compose - @docker compose$(if $(filter $(DOCKER_COMPOSE_YML_PATH),$(DOCKER_COMPOSE_YML_PATH)),, -f $(DOCKER_COMPOSE_YML_PATH)) $(1) + @docker compose $(1) endef -else -define docker_compose - $(call sub_step,$(DOCKER_WARNING_INSIDE)) -endef -endif + diff --git a/tools/make/drupal.mk b/tools/make/drupal.mk index 059237a4..1c4e59b2 100644 --- a/tools/make/drupal.mk +++ b/tools/make/drupal.mk @@ -1,59 +1,16 @@ -BUILD_TARGETS += drupal-create-folders +DUMP_SQL_EXISTS := $(shell test -f dump.sql && echo yes || echo no) DRUPAL_CONF_EXISTS := $(shell test -f conf/cmi/core.extension.yml && echo yes || echo no) -DRUPAL_FRESH_TARGETS := up build sync post-install -DRUPAL_NEW_TARGETS := up build drush-si drush-uli -DRUPAL_POST_INSTALL_TARGETS := drush-deploy -CLEAN_EXCLUDE += $(WEBROOT)/sites/default/files -DRUPAL_DISABLE_MODULES ?= no -DRUPAL_ENABLE_MODULES ?= no -DRUPAL_PROFILE ?= minimal -DRUPAL_SITE_EMAIL ?= maintenance@druid.fi -DRUPAL_SYNC_FILES ?= yes -DRUPAL_SYNC_SOURCE ?= main -DRUSH_RSYNC_MODE ?= Pakzu -DRUSH_RSYNC_OPTS ?= -- --omit-dir-times --no-perms --no-group --no-owner --chmod=ugo=rwX -DRUSH_RSYNC_EXCLUDE ?= css:ctools:js:php:tmp:tmp_php -SYNC_TARGETS += drush-sync -SYNC_FROM_REMOTE ?= no -CS_EXTS := inc,php,module,install,profile,theme -CS_STANDARD_PATHS := vendor/drupal/coder/coder_sniffer,vendor/slevomat/coding-standard -CS_STANDARDS := Drupal,DrupalPractice -LINT_PATHS_JS += ./$(WEBROOT)/modules/custom/*/js -LINT_PATHS_JS += ./$(WEBROOT)/themes/custom/*/js -LINT_PATHS_PHP += drush -LINT_PATHS_PHP += $(WEBROOT)/modules/custom -LINT_PATHS_PHP += $(WEBROOT)/themes/custom -LINT_PHP_TARGETS += lint-drupal -FIX_TARGETS += fix-drupal -DRUPAL_CREATE_FOLDERS := $(WEBROOT)/sites/default/files/private -DRUPAL_CREATE_FOLDERS += $(WEBROOT)/sites/default/files/translations - -ifeq ($(LAGOON),yes) - SYNC_FROM_REMOTE := yes -endif -ifeq ($(GH_DUMP_ARTIFACT),yes) - DRUPAL_FRESH_TARGETS := gh-download-dump $(DRUPAL_FRESH_TARGETS) -endif +DRUPAL_CREATE_FOLDERS := /app/public/sites/default/files/private +DRUPAL_CREATE_FOLDERS += /app/public/sites/default/files/translations -ifneq ($(DRUPAL_DISABLE_MODULES),no) - SYNC_TARGETS += drush-disable-modules -endif - -ifneq ($(DRUPAL_ENABLE_MODULES),no) - DRUPAL_POST_INSTALL_TARGETS += drush-enable-modules -endif +DRUPAL_PROFILE ?= minimal PHONY += drupal-create-folders drupal-create-folders: $(call step,Create folders for Drupal...\n) $(call docker_compose_exec,mkdir -v -p $(DRUPAL_CREATE_FOLDERS)) -PHONY += drupal-update -drupal-update: ## Update Drupal core with Composer - $(call step,Update Drupal core with Composer...\n) - $(call composer,update -W "drupal/core-*") - PHONY += drush-cex drush-cex: ## Export configuration $(call step,Export configuration...\n) @@ -78,7 +35,7 @@ drush-uli: DRUPAL_UID ?= drush-uli: DRUPAL_DESTINATION ?= admin/reports/status drush-uli: ## Get login link $(call step,Login to your site with:\n) - $(call drush,uli$(if $(DRUPAL_UID), --uid=$(DRUPAL_UID),) $(DRUPAL_DESTINATION)) + $(call drush,uli $(DRUPAL_DESTINATION)) PHONY += drush-uli-% drush-uli-%: ## Get login link for provided uid @@ -93,7 +50,13 @@ else endif drush-si: ## Site install $(call step,Do Drush site:install...\n) - $(call drush,si ${DRUSH_SI} --site-mail=$(DRUPAL_SITE_EMAIL)) + $(call drush,si ${DRUSH_SI}) + +PHONY += drush-helfi-enable-modules +drush-helfi-enable-modules: ## Enable modules and base configurations. + $(call step,Install base configurations...) + $(call drush,cr) + $(call drush,en -y helfi_platform_config helfi_platform_config_base) PHONY += drush-deploy drush-deploy: ## Run Drush deploy @@ -113,69 +76,47 @@ drush-reset-local: ## Reset local configuration (cim, cr, updb, cr) $(call drush,updb -y --no-cache-clear) $(call drush,cr) +PHONY += drush-unblock +drush-unblock: ## Get login link + $(call step,Unblocking helfi-admin...\n) + $(call drush,user:unblock --uid=1) + +PHONY += drush-locale-update +drush-locale-update: drupal-create-folders ## Update translations. + $(call step,Update translations...) + $(call drush,state:set locale.translation_last_checked 0) + $(call drush,locale:check) + $(call drush,locale:update) + $(call drush,cr) + +DRUPAL_POST_INSTALL_TARGETS := drush-sanitize-database drush-deploy drush-locale-update drush-unblock drush-uli + +DRUPAL_FRESH_TARGETS := up drupal-create-folders composer-install drush-import-dump $(DRUPAL_POST_INSTALL_TARGETS) PHONY += fresh -fresh: ## Build fresh development environment and sync - @$(MAKE) $(DRUPAL_FRESH_TARGETS) +fresh: $(DRUPAL_FRESH_TARGETS) ## Build fresh development environment and sync +DRUPAL_NEW_TARGETS := up drupal-create-folders composer-install drush-si drush-helfi-enable-modules drush-cr drush-unblock drush-uli PHONY += new -new: ## Create a new empty Drupal installation from configuration - @$(MAKE) $(DRUPAL_NEW_TARGETS) - -PHONY += post-install -post-install: ## Run post-install Drush actions - @$(MAKE) $(DRUPAL_POST_INSTALL_TARGETS) drush-uli - -PHONY += drush-disable-modules -drush-disable-modules: ## Disable Drupal modules - $(call step,Disable Drupal modules...\n) -ifneq ($(DRUPAL_DISABLE_MODULES),no) - $(call drush,pmu -y $(subst ",,$(DRUPAL_DISABLE_MODULES))) -else - $(call sub_step,No modules to disable) -endif - -PHONY += drush-enable-modules -drush-enable-modules: ## Enable Drupal modules - $(call step,Enable Drupal modules...\n) -ifneq ($(DRUPAL_ENABLE_MODULES),no) - $(call drush,en -y $(subst ",,$(DRUPAL_ENABLE_MODULES))) -else - $(call sub_step,No modules to enable) -endif +new: $(DRUPAL_NEW_TARGETS) ## Create a new empty Drupal installation from configuration -PHONY += drush-sync -drush-sync: drush-sync-db drush-sync-files ## Sync database and files +dump.sql: + @touch /tmp/kube-config + @docker run --pull=always --env-file .env -it --rm -v /tmp/kube-config:/root/.kube/config -v $(shell pwd):/app --name helfi-oc ghcr.io/city-of-helsinki/drupal-oc-cli:latest sh -c "db-sync" + $(call docker_compose_exec,gunzip dump.sql.gz) -PHONY += drush-sync-db -drush-sync-db: ## Sync database +PHONY += drush-import-dump +drush-import-dump: dump.sql $(call drush,sql-drop --quiet -y) -ifeq ($(DUMP_SQL_EXISTS),yes) $(call step,Import local SQL dump...) - $(call drush,sql-query --file=${DOCKER_PROJECT_ROOT}/$(DUMP_SQL_FILENAME) && echo 'SQL dump imported') -else -ifeq ($(SYNC_FROM_REMOTE),yes) - $(call step,Sync database from @$(DRUPAL_SYNC_SOURCE)...) - $(call drush,sql-sync -y --structure-tables-key=common @$(DRUPAL_SYNC_SOURCE) @self) -endif -endif + $(call drush,sql-query --file=/app/dump.sql && echo 'SQL dump imported') -PHONY += drush-sync-files -drush-sync-files: ## Sync files -ifeq ($(DRUPAL_SYNC_FILES),yes) -ifeq ($(SYNC_FROM_REMOTE),yes) - $(call step,Sync files from @$(DRUPAL_SYNC_SOURCE)...) - $(call drush,-y rsync --exclude-paths=$(DRUSH_RSYNC_EXCLUDE) --mode=$(DRUSH_RSYNC_MODE) @$(DRUPAL_SYNC_SOURCE):%files @self:%files $(DRUSH_RSYNC_OPTS)) -endif -endif +PHONY += drush-sanitize-database +drush-sanitize-database: + $(call drush,sql-query \"UPDATE file_managed SET uri = REPLACE(uri, 'azure://', 'public://');\",Fixed Azure URIs) PHONY += drush-create-dump -drush-create-dump: FLAGS := --structure-tables-key=common --extra-dump=--no-tablespaces drush-create-dump: ## Create database dump to dump.sql - $(call drush,sql-dump $(FLAGS) --result-file=${DOCKER_PROJECT_ROOT}/$(DUMP_SQL_FILENAME)) - -PHONY += drush-download-dump -drush-download-dump: ## Download database dump to dump.sql - $(call drush,@$(DRUPAL_SYNC_SOURCE) sql-dump --structure-tables-key=common > ${DOCKER_PROJECT_ROOT}/$(DUMP_SQL_FILENAME)) + $(call drush,sql-dump --structure-tables-key=common --extra-dump=--no-tablespaces --result-file=/app/dump.sql) PHONY += open-db-gui open-db-gui: ## Open database with GUI tool @@ -185,30 +126,6 @@ open-db-gui: ## Open database with GUI tool $(eval DB_PASS ?= drupal) @open mysql://$(DB_USER):$(DB_PASS)@$(shell docker compose port $(DB_SERVICE) 3306 | grep -v ::)/$(DB_NAME) -PHONY += fix-drupal -fix-drupal: PATHS := $(subst $(space),,$(LINT_PATHS_PHP)) -fix-drupal: ## Fix Drupal code style - $(call step,Fix Drupal code style with phpcbf...\n) - $(call cs,phpcbf,$(PATHS)) - -PHONY += lint-drupal -lint-drupal: PATHS := $(subst $(space),,$(LINT_PATHS_PHP)) -lint-drupal: ## Lint Drupal code style - $(call step,Lint Drupal code style with phpcs...\n) - $(call cs,phpcs,$(PATHS)) - -PHONY += mmfix -mmfix: MODULE := MISSING_MODULE -mmfix: - $(call step,Remove missing module '$(MODULE)'\n) - $(call drush,sql-query \"DELETE FROM key_value WHERE collection='system.schema' AND name='$(MODULE)';\",Module was removed) - -ifeq ($(RUN_ON),docker) define drush $(call docker_compose_exec,drush $(1),$(2)) endef -else -define drush - @drush $(1) -endef -endif diff --git a/tools/make/project/git.mk b/tools/make/git.mk similarity index 54% rename from tools/make/project/git.mk rename to tools/make/git.mk index c598f4d7..aa22a43e 100644 --- a/tools/make/project/git.mk +++ b/tools/make/git.mk @@ -1,3 +1,3 @@ PHONY += copy-commit-message-script copy-commit-message-script: - @$(foreach name,$(shell find . -type d -name ".git" -exec dirname {} \; 2> /dev/null ),cp tools/commit-msg $(name)/.git/hooks;) + @$(foreach name,$(shell find . -type d -name ".git" -exec dirname {} \; 2> /dev/null ),cp tools/commit-msg $(name)/.git/hooks && chmod +x $(name)/.git/hooks/commit-msg;) diff --git a/tools/make/include.mk b/tools/make/include.mk deleted file mode 100644 index de30c41e..00000000 --- a/tools/make/include.mk +++ /dev/null @@ -1,60 +0,0 @@ -include $(DRUIDFI_TOOLS_MAKE_DIR)common.mk - -ifeq ($(call has,docker),yes) -include $(DRUIDFI_TOOLS_MAKE_DIR)docker.mk -endif - -include $(DRUIDFI_TOOLS_MAKE_DIR)qa.mk - -# -# Apps -# - -IS_DRUPAL ?= $(shell test -f $(WEBROOT)/sites/default/settings.php && echo yes || echo no) -IS_SYMFONY ?= $(shell test -f config/bundles.php && echo yes || echo no) - -ifeq ($(IS_DRUPAL),yes) -include $(DRUIDFI_TOOLS_MAKE_DIR)drupal.mk -endif - -ifeq ($(IS_SYMFONY),yes) -include $(DRUIDFI_TOOLS_MAKE_DIR)symfony.mk -endif - -# -# Other tools -# - -HAS_ANSIBLE ?= $(shell test -d ansible && echo yes || echo no) - -ifeq ($(HAS_ANSIBLE),yes) -include $(DRUIDFI_TOOLS_MAKE_DIR)ansible.mk -endif - -# -# Hosting systems -# - -LAGOON := $(shell test -f .lagoon.yml && echo yes || echo no) - -ifeq ($(LAGOON),yes) - SYSTEM := LAGOON -else - SYSTEM := WHOKNOWS -endif - -ifeq ($(SYSTEM),LAGOON) -include $(DRUIDFI_TOOLS_MAKE_DIR)lagoon.mk -endif - -COMPOSER_JSON_EXISTS := $(shell test -f $(COMPOSER_JSON_PATH)/composer.json && echo yes || echo no) - -ifeq ($(COMPOSER_JSON_EXISTS),yes) -include $(DRUIDFI_TOOLS_MAKE_DIR)composer.mk -endif - -PACKAGE_JSON_EXISTS := $(shell test -f $(PACKAGE_JSON_PATH)/package.json && echo yes || echo no) - -ifeq ($(PACKAGE_JSON_EXISTS),yes) -include $(DRUIDFI_TOOLS_MAKE_DIR)javascript.mk -endif diff --git a/tools/make/javascript.mk b/tools/make/javascript.mk deleted file mode 100644 index 9b8c2fcf..00000000 --- a/tools/make/javascript.mk +++ /dev/null @@ -1,44 +0,0 @@ -BUILD_TARGETS += js-install -JS_PACKAGE_MANAGER ?= yarn -JS_PACKAGE_MANAGER_CWD_FLAG_NPM ?= --prefix -JS_PACKAGE_MANAGER_CWD_FLAG_YARN ?= --cwd -INSTALLED_NODE_VERSION := $(shell command -v node > /dev/null && node --version | cut -c2-3 || echo no) -NVM_SH := $(HOME)/.nvm/nvm.sh -NVM := $(shell test -f "$(NVM_SH)" && echo yes || echo no) -NODE_BIN := $(shell command -v node || echo no) -NPM_BIN := $(shell command -v npm || echo no) -YARN_BIN := $(shell command -v yarn || echo no) -NODE_VERSION ?= 16 - -PHONY += js-install -js-install: ## Install JS packages -ifeq ($(JS_PACKAGE_MANAGER),yarn) - $(call node_run,install --frozen-lockfile) -else - $(call node_run,install --no-audit --no-fund --engine-strict true) -endif - -PHONY += js-outdated -js-outdated: ## Show outdated JS packages - $(call step,Show outdated JS packages with $(JS_PACKAGE_MANAGER)...) - $(call node_run,outdated) - -ifeq ($(NVM),no) -define node_run - $(call error,$(NVM_REQUIRED)) -endef -else -define node_run - $(call step,Run '$(JS_PACKAGE_MANAGER) $(1)' with Node $(NODE_VERSION)...\n) - @. $(NVM_SH) && (nvm which $(NODE_VERSION) > /dev/null 2>&1 || nvm install $(NODE_VERSION)) && \ - nvm exec $(NODE_VERSION) $(JS_PACKAGE_MANAGER) $(if $(filter $(JS_PACKAGE_MANAGER),yarn),$(JS_PACKAGE_MANAGER_CWD_FLAG_YARN),$(JS_PACKAGE_MANAGER_CWD_FLAG_NPM)) $(PACKAGE_JSON_PATH) $(1) -endef -endif - -define NVM_REQUIRED - - -🚫 NVM is required to run $(JS_PACKAGE_MANAGER) commands and control Node versions! - - -endef diff --git a/tools/make/kubectl.mk b/tools/make/kubectl.mk deleted file mode 100644 index 60f5003e..00000000 --- a/tools/make/kubectl.mk +++ /dev/null @@ -1,56 +0,0 @@ -KUBECTL_BIN := $(shell command -v kubectl || echo no) -KUBECTL_NAMESPACE ?= foobar-namespace -KUBECTL_SHELL ?= sh -KUBECTL_EXEC_FLAGS ?= -n $(KUBECTL_NAMESPACE) -c $(KUBECTL_CONTAINER) -KUBECTL_POD_SELECTOR ?= appName=foobar-app -KUBECTL_WORKDIR ?= /app - -PHONY += kubectl-sync-db -kubectl-sync-db: ## Sync database from Kubernetes - $(call drush,sql-drop --quiet -y) -ifeq ($(DUMP_SQL_EXISTS),no) - $(eval POD := $(call kubectl_get_pod)) - $(call step,Get database dump from $(POD)...\n) - $(KUBECTL_BIN) exec $(KUBECTL_EXEC_FLAGS) $(POD) -- drush sql-dump --structure-tables-key=common --extra-dump=--no-tablespaces --result-file=/tmp/$(DUMP_SQL_FILENAME) --gzip - $(KUBECTL_BIN) cp $(KUBECTL_EXEC_FLAGS) --retries=-1 $(POD):/tmp/$(DUMP_SQL_FILENAME).gz ./$(DUMP_SQL_FILENAME).gz - $(KUBECTL_BIN) exec $(KUBECTL_EXEC_FLAGS) $(POD) -- rm -f /tmp/$(DUMP_SQL_FILENAME).gz - @gzip -d $(DUMP_SQL_FILENAME).gz -endif - $(call step,Import local SQL dump...\n) - $(call drush,sql-query --file=${DOCKER_PROJECT_ROOT}/$(DUMP_SQL_FILENAME)) - -PHONY += kubectl-sync-files-tar -kubectl-sync-files-tar: ## Sync files from Kubernetes using tar - $(call step,Copy files from remote...\n) - $(eval POD := $(call kubectl_get_pod)) - $(KUBECTL_BIN) exec $(KUBECTL_EXEC_FLAGS) $(POD) -- tar cf - $(SYNC_FILES_EXCLUDE) $(SYNC_FILES_PATH) | tar xfv - -C . - -PHONY += kubectl-rsync-files -kubectl-rsync-files: FLAGS := -aurP --blocking-io -kubectl-rsync-files: REMOTE_PATH := $(KUBECTL_WORKDIR)/$(SYNC_FILES_PATH)/ -kubectl-rsync-files: LOCAL_PATH := ./$(SYNC_FILES_PATH)/ -kubectl-rsync-files: ## Sync files from Kubernetes using rsync - $(call step,Sync files from remote...\n) - $(eval POD := $(call kubectl_get_pod)) - rsync $(FLAGS) $(SYNC_FILES_EXCLUDE) --rsync-path=$(REMOTE_PATH) -e '$(KUBECTL_BIN) exec -i $(KUBECTL_EXEC_FLAGS) $(POD) -- env ' rsync: $(LOCAL_PATH) - -PHONY += kubectl-shell -kubectl-shell: ## Open shell to Pod in Kubernetes - $(eval POD := $(call kubectl_get_pod)) - $(KUBECTL_BIN) exec $(KUBECTL_EXEC_FLAGS) -ti $(POD) -- $(KUBECTL_SHELL) - -define kubectl_exec - $(KUBECTL_BIN) exec $(KUBECTL_EXEC_FLAGS) $(1) -- $(KUBECTL_SHELL) -c '$(2)' -endef - -define kubectl_exec_to_file - $(KUBECTL_BIN) exec $(KUBECTL_EXEC_FLAGS) $(1) -- $(KUBECTL_SHELL) -c '$(2)' > $(3) -endef - -define kubectl_cp - $(KUBECTL_BIN) cp $(KUBECTL_EXEC_FLAGS) $(1) $(2) -endef - -define kubectl_get_pod - $(shell $(KUBECTL_BIN) get pods -n $(KUBECTL_NAMESPACE) --selector=$(KUBECTL_POD_SELECTOR) --template '{{range .items}}{{ if not .metadata.deletionTimestamp }}{{.metadata.name}}{{"\n"}}{{end}}{{end}}') -endef diff --git a/tools/make/lagoon.mk b/tools/make/lagoon.mk deleted file mode 100644 index e6baebad..00000000 --- a/tools/make/lagoon.mk +++ /dev/null @@ -1,38 +0,0 @@ -CLI_SERVICE := cli -CLI_SHELL := bash -DB_SERVICE := mariadb - -INSTANCE_prod_USER ?= project-name-branch -INSTANCE_prod_HOST ?= ssh.lagoon.amazeeio.cloud -INSTANCE_prod_OPTS ?= $(SSH_OPTS) -p 32222 -t -INSTANCE_test_USER ?= project-name-branch -INSTANCE_test_HOST ?= $(INSTANCE_prod_HOST) -INSTANCE_test_OPTS ?= $(INSTANCE_prod_OPTS) - -ifeq ($(MAKECMDGOALS),set-lagoon-secrets) -include .env.local.lagoon -endif - -PHONY += lagoon-env -lagoon-env: ## Print Lagoon env variables - $(call docker_compose_exec,printenv | grep LAGOON_) - -PHONY += deploy-lagoon-% -deploy-lagoon-%: ## Deploy lagoon branch - $(call step,Deploy Lagoon branch $*...\n) - @lagoon -p $(LAGOON_PROJECT) deploy branch -b $* - -PHONY += set-lagoon-secrets-% -set-lagoon-secrets-%: ## Set Lagoon secrets - $(call step,Set Lagoon secrets on $*...\n) - @$(foreach secret,$(LAGOON_SECRETS),$(call set_lagoon_secret,$(secret),$*)) - -PHONY += list-lagoon-vars-% -list-lagoon-vars-%: ## List variables from Lagoon - $(call step,List variables from Lagoon on $*...\n) - @lagoon -p $(LAGOON_PROJECT) list v --reveal -e $* - -define set_lagoon_secret -printf "Setting secret on ${2}: %s = %s \n" "${1}" "${${1}}"; -lagoon -p $(LAGOON_PROJECT) a v -N "${1}" -V "${${1}}" -S runtime -e ${2} --force || true; -endef diff --git a/tools/make/override.mk b/tools/make/override.mk deleted file mode 100644 index df8baac5..00000000 --- a/tools/make/override.mk +++ /dev/null @@ -1,3 +0,0 @@ -# Docker CLI container -CLI_SERVICE=app -CLI_SHELL=bash diff --git a/tools/make/project/.keepme b/tools/make/project/.keepme deleted file mode 100644 index e69de29b..00000000 diff --git a/tools/make/project/composer.mk b/tools/make/project/composer.mk deleted file mode 100644 index aefdbcc6..00000000 --- a/tools/make/project/composer.mk +++ /dev/null @@ -1,3 +0,0 @@ -PHONY += insert-post-install-hooks - -insert-post-install-hooks: diff --git a/tools/make/project/db-sync.sh b/tools/make/project/db-sync.sh deleted file mode 100644 index 2d69f38e..00000000 --- a/tools/make/project/db-sync.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/sh - -set -e - -if [ ! -n "$OC_PROJECT_NAME" ]; then - echo "OC_PROJECT_NAME not set." - exit 1; -fi - -oc login --token=${1} --server=https://api.arodevtest.hel.fi:6443 -oc project ${OC_PROJECT_NAME} - -OC_POD_NAME=$(oc get pods -o name | grep drupal-cron | grep -v deploy) - -if [ ! -n "$OC_POD_NAME" ]; then - echo "Failed to parse pod name." - exit 1 -fi - -oc rsh $OC_POD_NAME rm -f /tmp/dump.sql -oc rsh $OC_POD_NAME drush sql:dump --structure-tables-key=common \ - --extra-dump='--no-tablespaces --hex-blob' \ - --result-file=/tmp/dump.sql - -oc rsync $OC_POD_NAME:/tmp/dump.sql /app diff --git a/tools/make/project/install.mk b/tools/make/project/install.mk deleted file mode 100644 index 1982e3da..00000000 --- a/tools/make/project/install.mk +++ /dev/null @@ -1,49 +0,0 @@ -ifeq ($(DRUPAL_CONF_EXISTS),yes) - DRUPAL_NEW_TARGETS := up build drush-si drush-cr drush-locale-update drush-helfi-locale-import drush-unblock drush-uli -else - DRUPAL_NEW_TARGETS := up build drush-si drush-helfi-enable-modules drush-locale-update drush-helfi-locale-import drush-unblock drush-uli -endif -DRUPAL_POST_INSTALL_TARGETS := drush-deploy drush-locale-update drush-helfi-locale-import drush-unblock - -OC_LOGIN_TOKEN ?= $(shell bash -c 'read -s -p "You must obtain an API token by visiting https://oauth-openshift.apps.arodevtest.hel.fi/oauth/token/request (Token):" token; echo $$token') - -SYNC_TARGETS := drush-sync-db - -ifneq ($(DUMP_SQL_EXISTS),yes) -SYNC_TARGETS := oc-sync -endif - -PHONY += oc-sync -oc-sync: - @docker run --env-file .env -it --rm -v $(shell pwd):/app --name helfi-oc ghcr.io/city-of-helsinki/drupal-oc-cli:latest sh -c "chmod +x /app/tools/make/project/db-sync.sh && /app/tools/make/project/db-sync.sh $(OC_LOGIN_TOKEN)" - $(call drush,sql-query --file=${DOCKER_PROJECT_ROOT}/$(DUMP_SQL_FILENAME),SQL dump imported) - $(call drush,sql-query \"UPDATE file_managed SET uri = REPLACE(uri, 'azure://', 'public://');\",Sanitized Azure URIs) - $(call drush,cr) - $(call drush,cim -y) - $(call drush,cr) - -PHONY += drush-helfi-enable-modules -drush-helfi-enable-modules: ## Enable modules and base configurations. - $(call step,Install base configurations...) - $(call drush,cr) - $(call drush,en -y helfi_platform_config helfi_platform_config_base) - -PHONY += drush-locale-update -drush-locale-update: ## Update translations. - $(call step,Update translations...) - @mkdir -p public/sites/default/files/translations - $(call drush,state:set locale.translation_last_checked 0) - $(call drush,locale:check) - $(call drush,locale:update) - $(call drush,cr) - -PHONY += drush-helfi-locale-import -drush-helfi-locale-import: ## Update translations from helfi platform config. - $(call step,Import helfi platform config translations...) - $(call drush,helfi:locale-import helfi_platform_config) - $(call drush,cr) - -PHONY += drush-unblock -drush-unblock: ## Get login link - $(call step,Unblocking helfi-admin...\n) - $(call drush,user:unblock --uid=1) diff --git a/tools/make/qa.mk b/tools/make/qa.mk index f4988fbe..4a9427e1 100644 --- a/tools/make/qa.mk +++ b/tools/make/qa.mk @@ -1,73 +1,33 @@ -TEST_TARGETS += test-phpunit -FIX_TARGETS := -LINT_PHP_TARGETS := -CS_INSTALLED := $(shell test -f $(COMPOSER_JSON_PATH)/vendor/bin/phpcs && echo yes || echo no) -CS_CONF_EXISTS := $(shell test -f phpcs.xml.dist && echo yes || echo no) -TESTSUITES ?= unit,kernel,functional +LINT_PHP_STANDARDS := Drupal,DrupalPractice +LINT_PHP_EXTENSIONS := inc,php,module,install,profile,theme + +LINT_PATHS_PHP := /app/public/modules/custom +LINT_PATHS_PHP += /app/public/themes/custom PHONY += fix -fix: ## Fix code style - $(call step,Fix code...) - $(call sub_step,Following targets will be run: $(FIX_TARGETS)) - @$(MAKE) $(FIX_TARGETS) +fix: fix-php ## Fix code style -PHONY += lint -lint: lint-php lint-js ## Check code style +PHONY += fix-php +fix-php: + $(call step,Fix code using phpcbf ($(LINT_PATHS_PHP))...) + $(call cs,phpcbf) -PHONY += lint-js -lint-js: DOCKER_NODE_IMG ?= node:$(NODE_VERSION)-alpine -lint-js: WD := /app -lint-js: ## Check code style for JS files - $(call step,Install linters...) - @docker run --rm -v "$(CURDIR)":$(WD):cached -w $(WD) $(DOCKER_NODE_IMG) yarn --cwd $(WEBROOT)/core install - $(call step,Check code style for JS files: $(DRUPAL_LINT_PATHS)) - @docker run --rm -v "$(CURDIR)":$(WD):cached -w $(WD) $(DOCKER_NODE_IMG) \ - $(WEBROOT)/core/node_modules/eslint/bin/eslint.js --color --ignore-pattern '**/vendor/*' \ - --c ./$(WEBROOT)/core/.eslintrc.json --global nav,moment,responsiveNav:true $(LINT_PATHS_JS) +PHONY += lint +lint: lint-php ## Check code style PHONY += lint-php lint-php: ## Check code style for PHP files - $(call step,Check code style for PHP files...) - $(call sub_step,Following targets will be run: $(LINT_PHP_TARGETS)) - @$(MAKE) $(LINT_PHP_TARGETS) - $(call test_result,lint-php,"[OK]") + $(call step,Check code style for PHP files ($(LINT_PATHS_PHP))...) + $(call cs,phpcs) PHONY += test -test: ## Run tests - $(call group_step,Run test targets:${NO_COLOR} $(TEST_TARGETS)\n) - @$(MAKE) $(TEST_TARGETS) - $(call step,Tests completed.) +test: test-phpunit ## Run tests PHONY += test-phpunit test-phpunit: ## Run PHPUnit tests $(call step,Run PHPUnit tests...) -ifeq ($(CI),true) - vendor/bin/phpunit -c phpunit.xml.dist --testsuite $(TESTSUITES) -else - $(call docker_compose_exec,${DOCKER_PROJECT_ROOT}/vendor/bin/phpunit -c $(DOCKER_PROJECT_ROOT)/phpunit.xml.dist \ - --testsuite $(TESTSUITES)) -endif - $(call test_result,test-phpunit,"[OK]") - -PHONY += test-phpunit-locally -test-phpunit-locally: - @SIMPLETEST_BASE_URL=https://$(DRUPAL_HOSTNAME) SIMPLETEST_DB=mysql://$(DB_URL) \ - vendor/bin/phpunit -c $(CURDIR)/phpunit.xml.dist --testsuite $(TESTSUITES) - -define test_result - @echo "\n${YELLOW}${1}:${NO_COLOR} ${GREEN}${2}${NO_COLOR}" -endef + $(call docker_compose_exec,/app/vendor/bin/phpunit -c /app/phpunit.xml.dist $(1)) -ifeq ($(CS_INSTALLED)-$(CS_CONF_EXISTS),yes-yes) -define cs -$(call docker_compose_exec,vendor/bin/$(1)) -endef -else ifeq ($(CS_INSTALLED)-$(CS_CONF_EXISTS),yes-no) -define cs -$(call docker_compose_exec,vendor/bin/$(1) --standard=$(CS_STANDARDS) --extensions=$(CS_EXTS) --ignore=node_modules $(2)) -endef -else define cs -$(call warn,CodeSniffer is not installed!) + $(call docker_compose_exec,vendor/bin/$(1) --standard=$(LINT_PHP_STANDARDS) --extensions=$(LINT_PHP_EXTENSIONS) --ignore=node_modules $(LINT_PATHS_PHP)) endef -endif diff --git a/tools/make/symfony.mk b/tools/make/symfony.mk deleted file mode 100644 index 73672075..00000000 --- a/tools/make/symfony.mk +++ /dev/null @@ -1,78 +0,0 @@ -SF_FRESH_TARGETS := up build sf-cw sf-about sf-open -FIX_TARGETS += fix-symfony -LINT_PHP_TARGETS += lint-symfony -CS_FIXER_INSTALLED := $(shell test -f $(COMPOSER_JSON_PATH)/vendor/bin/php-cs-fixer && echo yes || echo no) - -PHONY += encore-dev -encore-dev: ## Do Encore development build - $(call step,Do Encore development build...) - $(call node_run,dev) - -PHONY += encore-watch -encore-watch: ## Run Encore watch - $(call step,Do Encore watch...) - $(call node_run,watch) - -PHONY += sf-about -sf-about: ## Displays information about the current project - $(call sf_console,about) - -PHONY += sf-cc -sf-cc: ## Clear Symfony caches - $(call step,Clear Symfony caches...) - $(call sf_console,cache:clear) - -PHONY += sf-cw -sf-cw: ## Warm Symfony caches - $(call step,Warm Symfony caches...) - $(call sf_console,cache:warmup) - -PHONY += sf-db-init -sf-db-init: ## Setup database schema and load fixtures - $(call step,Setup database schema...) - $(call sf_console,doctrine:schema:update --force) - $(call sf_console,doctrine:fixtures:load -n) - -PHONY += sf-open -sf-open: ## Warm Symfony caches - $(call step,See your Symfony application with:\n) - $(call output,https://$(APP_HOST)) - -PHONY += sf-update -sf-update: ## Update Symfony packages with Composer - $(call step,Update Symfony packages with Composer...\n) - $(call composer,update -W "doctrine/*" "symfony/*" "twig/*" --no-scripts) - -PHONY += fresh -fresh: ## Build fresh development environment - @$(MAKE) $(SF_FRESH_TARGETS) - -PHONY += fix-symfony -fix-symfony: ## Fix Symfony code style - $(call step,Fix Symfony code style...\n) - $(call cs_symfony,fix --ansi src) - -PHONY += lint-symfony -lint-symfony: ## Lint Symfony code style - $(call step,Lint Symfony code style...\n) - $(call cs_symfony,fix --dry-run --diff --ansi --verbose src) - -ifeq ($(RUN_ON),docker) -define sf_console - $(call docker_compose_exec,bin/console $(1)) -endef -else -define sf_console - @bin/console $(1) -endef -endif - -ifeq ($(CS_FIXER_INSTALLED),yes) -define cs_symfony -$(call docker_compose_exec,vendor/bin/php-cs-fixer $(1)) -endef -else -define cs_symfony -$(call warn,PHP CS Fixer is not installed!) -endef -endif diff --git a/tools/make/project/theme.mk b/tools/make/theme.mk similarity index 98% rename from tools/make/project/theme.mk rename to tools/make/theme.mk index fd34d5d1..2657775c 100644 --- a/tools/make/project/theme.mk +++ b/tools/make/theme.mk @@ -1,4 +1,4 @@ -DEFAULT_NODE_VERSION ?= 18 +DEFAULT_NODE_VERSION ?= 20 NODE_DOCKER_RUN_EXTRA_ARGS ?= -it ifeq ($(CI),true) diff --git a/tools/make/utils.mk b/tools/make/utils.mk deleted file mode 100644 index 0feb372a..00000000 --- a/tools/make/utils.mk +++ /dev/null @@ -1,74 +0,0 @@ -# Colors -NO_COLOR=\033[0m -CYAN=\033[36m -GREEN=\033[0;32m -RED=\033[0;31m -YELLOW=\033[0;33m - -PHONY += help -help: ## List all make commands - $(call step,Available make commands:\n) - @cat $(MAKEFILE_LIST) | grep -e "^[a-zA-Z_\-]*: *.*## *" | awk 'BEGIN {FS = ":.*?## "}; {printf "${CYAN}%-30s${NO_COLOR} %s\n", $$1, $$2}' | sort - -PHONY += lt -lt: ## Open localtunnel -ifeq ($(shell command -v lt || echo no),no) - $(call warn,Install localtunnel with: ${YELLOW}npm install -g localtunnel${NO_COLOR}) -else - $(call step,Open localtunnel. Use CTRL+C to close localtunnel.\n) - @lt --port 443 --subdomain $(COMPOSE_PROJECT_NAME) --local-https --allow-invalid-cert -endif - -define dbg - @printf "${GREEN}${1}:${NO_COLOR} ${2}\n" -endef - -define group_step - @printf "\n🌟 ${YELLOW}${1}${NO_COLOR}\n" -endef - -define has -$(shell command -v ${1} > /dev/null 2>&1 && echo yes || echo no) -endef - -define step - @printf "\n⭐ ${YELLOW}${1}${NO_COLOR}\n" -endef - -define sub_step - @printf "\n ${YELLOW}${1}${NO_COLOR}\n" -endef - -define output - @echo "${1}" -endef - -define warn - @printf "\n⚠️ ${1}\n\n" -endef - -define copy - $(call output,Copy $(1) >> $(2)) - @cp $(1) $(2) -endef - -SED_Darwin := sed -i '' -SED_Linux := sed -i - -define get_port -$(shell netstat -aln|awk '$$6=="LISTEN"{if($$4~"[.:][0-9]+$$"){split($$4,a,/[:.]/);p2=a[length(a)];p[p2]=1;}}END{for(i=3000;i<3999&&p[i];i++){};if(i==3999){exit 1};print i}') -endef - -define replace_string - $(call output,Replace $(1) >> $(2) in $(3)) - @$(SED_$(UNAME_S)) 's/$(1)/$(2)/g' $(3) -endef - -define remove_string - $(call output,Remove $(1) from $(2)) - @$(SED_$(UNAME_S)) '/$(1)/d' $(2) -endef - -define run - @${1} && printf "${2}\n" || (printf "${RED}${3}${NO_COLOR}\n" && exit 1) -endef