From d52326c9a60863dc5df82c7486316af6c8a9141c Mon Sep 17 00:00:00 2001 From: per1234 Date: Sun, 26 Jul 2020 09:00:14 -0700 Subject: [PATCH 1/3] Document extra.time.* properties These properties provide time data from the machine running the build process. --- docs/platform-specification.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/platform-specification.md b/docs/platform-specification.md index 3ce51a7d449..a404f89696c 100644 --- a/docs/platform-specification.md +++ b/docs/platform-specification.md @@ -84,6 +84,10 @@ The following automatically generated properties can be used globally in all con meaningless version number. - `{ide_version}`: Compatibility alias for `{runtime.ide.version}` - `{runtime.os}`: the running OS ("linux", "windows", "macosx") +- `{extra.time.utc}`: Unix time (seconds since 1970-01-01T00:00:00Z) according to the machine the build is running on +- `{extra.time.local}`: Unix time with local timezone and DST offset +- `{extra.time.zone}`: local timezone offset without the DST component +- `{extra.time.dst}`: local daylight savings time offset Compatibility note: Versions before Arduino IDE 1.6.0 only used one digit per version number component in `{runtime.ide.version}` (so 1.5.9 was `159`, not `10509`). From fe91e8fbfb670dff14442df96eebbc01141ba7e1 Mon Sep 17 00:00:00 2001 From: per1234 Date: Sun, 26 Jul 2020 09:26:53 -0700 Subject: [PATCH 2/3] Add previously undocumented build.* properties to platform specification These are built-in properties of the builder, yet were previously undocumented. --- docs/platform-specification.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/platform-specification.md b/docs/platform-specification.md index a404f89696c..85b6700d825 100644 --- a/docs/platform-specification.md +++ b/docs/platform-specification.md @@ -84,6 +84,10 @@ The following automatically generated properties can be used globally in all con meaningless version number. - `{ide_version}`: Compatibility alias for `{runtime.ide.version}` - `{runtime.os}`: the running OS ("linux", "windows", "macosx") +- `{build.fqbn}`: the FQBN (fully qualified board name) of the board being compiled for. The FQBN follows the format: + `VENDOR:ARCHITECTURE:BOARD_ID[:MENU_ID=OPTION_ID[,MENU2_ID=OPTION_ID ...]]` +- `{build.source.path}`: Path to the sketch being compiled. If the sketch is in an unsaved state, it will the path of + its temporary folder. - `{extra.time.utc}`: Unix time (seconds since 1970-01-01T00:00:00Z) according to the machine the build is running on - `{extra.time.local}`: Unix time with local timezone and DST offset - `{extra.time.zone}`: local timezone offset without the DST component From 93d7f7181f432d90d102215526b0a225297a51d5 Mon Sep 17 00:00:00 2001 From: per1234 Date: Sun, 26 Jul 2020 09:28:07 -0700 Subject: [PATCH 3/3] Add miscellaneous undocumented built-in properties to platform specification --- docs/platform-specification.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/platform-specification.md b/docs/platform-specification.md index 85b6700d825..4597494614f 100644 --- a/docs/platform-specification.md +++ b/docs/platform-specification.md @@ -84,6 +84,9 @@ The following automatically generated properties can be used globally in all con meaningless version number. - `{ide_version}`: Compatibility alias for `{runtime.ide.version}` - `{runtime.os}`: the running OS ("linux", "windows", "macosx") +- `{software}`: set to "ARDUINO" +- `{name}`: platform vendor name +- `{_id}`: [board ID](#boardstxt) of the board being compiled for - `{build.fqbn}`: the FQBN (fully qualified board name) of the board being compiled for. The FQBN follows the format: `VENDOR:ARCHITECTURE:BOARD_ID[:MENU_ID=OPTION_ID[,MENU2_ID=OPTION_ID ...]]` - `{build.source.path}`: Path to the sketch being compiled. If the sketch is in an unsaved state, it will the path of