Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feature: add datetime to rules context (#484)
This PR adds date information to rules context allowing to condition a profile deployment based on current year, month or day. In the following example, the profile is installed only if QDT runs on a Linux operating system and if the current year >= 2023: ```json { "$schema": "https://raw.githubusercontent.com/Guts/qgis-deployment-cli/main/docs/schemas/profile/qgis_profile.json", "name": "QDT Only Linux", "folder_name": "qdt_only_linux", "description": "Demonstrating a QDT profile that's deployed only on Linux.", "author": "Julien Moura", "email": "infos+qdt@oslandia.com", "qgisMinimumVersion": "3.34.0", "qgisMaximumVersion": "3.99.10", "version": "1.0.0", "rules": [ { "name": "Environment", "description": "Profile is configured to run only on Linux.", "conditions": { "all": [ { "path": "$.environment.operating_system_code", "value": "linux", "operator": "equal" }, { "path": "$.date.current_year", "value": 2023, "operator": "greater_than_inclusive" } ] } } ] } ``` Depends on #481
- Loading branch information