Before importUrl existed, or was commonly used, someone added the import URL to the top of their code. I saw it and the light went on and I added it to all of my code. I also rabble-roused as many as I could to include... and since it's a once per lifetime addition, I seemed to have great success. (Ok, others did this too but I'm happy to pretend it was all my effort ) Then importUrl came along and again, because it was simple and one off, it was mostly included.
Then, for me, Cobra's idea of including a weekly check against a file for an update occurred and while I eventually deviated in the file format, for my own efficiency in updating the file, I still, to this day include the feature. Thus I must maintain TWO files containing the same info, but in two formats. Maybe someday that burden will grow to be worth the effort to change all my code to use a single file, but that day has not come, yet.
For me, I feel that a release of updated code is dominated by the version updating effort. I won't release tiny changes because the 5 mins it takes to update the version files (all of them) encourages ME to delay/defer.
Which is easier to update/maintain??
{
"packageName": "Auto_Off",
"author": "csteele",
"dateReleased": "2020-10-11",
"apps": [
{
"id": "b03472ad-a305-4544-8e76-1d5b39e750b0",
"name": "Auto_Off",
"namespace": "csteele",
"location": "https://raw.githubusercontent.com/csteele-PD/Hubitat-public/master/Auto_Off/Auto_Off.groovy",
"version": "1.0.1",
"oauth": false,
"primary": false,
"required": true
},
{
"id": "dd3ec702-7bee-4a46-aad4-b9a53145d9ec",
"name": "Auto_Off device",
"namespace": "csteele",
"location": "https://raw.githubusercontent.com/csteele-PD/Hubitat-public/master/Auto_Off/Auto_Off_c.groovy",
"version": "1.0.3",
"oauth": false,
"primary": false,
"required": true
},
{
"id": "887bf9e2-41ce-483b-a9d7-121a26d76eb1",
"name": "Auto_Off poll",
"namespace": "csteele",
"location": "https://raw.githubusercontent.com/csteele-PD/Hubitat-public/master/Auto_Off/Auto_Off_o.groovy",
"version": "1.0.1",
"oauth": false,
"primary": false,
"required": true
}
]
}
OR
{
"author": "C Steele",
"comment": "",
"copyright": " Ⓒ 2020 cSteele",
"application": {
"Auto_Off": {"ver": "1.0.1", "updated": "10/14/2020"},
"Auto_Off_c": {"ver": "1.0.3", "updated": "10/14/2020"},
"Auto_Off_o": {"ver": "1.0.1", "updated": "10/14/2020"}
},
"driver": {
}
}
Additionally, all my code has:
public static String version() { return "v1.0.2" }
which is probably one of the rare formats... defining it as a method.