Merge remote-tracking branch 'tbnobody/OpenDTU/master' into development

This commit is contained in:
helgeerbe 2023-04-11 09:37:56 +02:00
commit 71128e5a55
6 changed files with 16 additions and 4 deletions

View File

@ -52,6 +52,9 @@ jobs:
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- name: Get tags
run: git fetch --force --tags origin
- name: Cache pip - name: Cache pip
uses: actions/cache@v3 uses: actions/cache@v3
with: with:

View File

@ -27,10 +27,10 @@ build_unflags =
lib_deps = lib_deps =
https://github.com/yubox-node-org/ESPAsyncWebServer https://github.com/yubox-node-org/ESPAsyncWebServer
bblanchon/ArduinoJson @ ^6.21.0 bblanchon/ArduinoJson @ ^6.21.1
https://github.com/bertmelis/espMqttClient.git#v1.4.2 https://github.com/bertmelis/espMqttClient.git#v1.4.2
nrf24/RF24 @ ^1.4.5 nrf24/RF24 @ ^1.4.5
olikraus/U8g2 @ ^2.34.16 olikraus/U8g2 @ ^2.34.17
buelowp/sunset @ ^1.1.7 buelowp/sunset @ ^1.1.7
https://github.com/coryjfowler/MCP_CAN_lib https://github.com/coryjfowler/MCP_CAN_lib
plerup/EspSoftwareSerial@^8.0.1 plerup/EspSoftwareSerial@^8.0.1

View File

@ -17,7 +17,7 @@
</tr> </tr>
<tr> <tr>
<th>{{ $t('firmwareinfo.FirmwareVersion') }}</th> <th>{{ $t('firmwareinfo.FirmwareVersion') }}</th>
<td><a :href="'https://github.com/tbnobody/OpenDTU/commits/' + systemStatus.git_hash" <td><a :href="versionInfoUrl"
target="_blank" v-tooltip :title="$t('firmwareinfo.FirmwareVersionHint')"> target="_blank" v-tooltip :title="$t('firmwareinfo.FirmwareVersionHint')">
{{ systemStatus.git_hash }} {{ systemStatus.git_hash }}
</a></td> </a></td>
@ -72,6 +72,12 @@ export default defineComponent({
return timestampToString(value, true); return timestampToString(value, true);
}; };
}, },
versionInfoUrl(): string {
if (this.systemStatus.git_is_hash) {
return 'https://github.com/tbnobody/OpenDTU/commits/' + this.systemStatus.git_hash;
}
return 'https://github.com/tbnobody/OpenDTU/releases/tag/' + this.systemStatus.git_hash;
}
}, },
}); });
</script> </script>

View File

@ -9,6 +9,7 @@ export interface SystemStatus {
sdkversion: string; sdkversion: string;
config_version: string; config_version: string;
git_hash: string; git_hash: string;
git_is_hash: boolean;
resetreason_0: string; resetreason_0: string;
resetreason_1: string; resetreason_1: string;
cfgsavecount: number; cfgsavecount: number;

View File

@ -51,11 +51,13 @@ export default defineComponent({
}, },
getUpdateInfo() { getUpdateInfo() {
// If the left char is a "g" the value is the git hash (remove the "g") // If the left char is a "g" the value is the git hash (remove the "g")
this.systemDataList.git_hash = this.systemDataList.git_hash?.substring(0, 1) == 'g' ? this.systemDataList.git_hash?.substring(1) : this.systemDataList.git_hash; this.systemDataList.git_is_hash = this.systemDataList.git_hash?.substring(0, 1) == 'g';
this.systemDataList.git_hash = this.systemDataList.git_is_hash ? this.systemDataList.git_hash?.substring(1) : this.systemDataList.git_hash;
// Handle format "v0.1-5-gabcdefh" // Handle format "v0.1-5-gabcdefh"
if (this.systemDataList.git_hash.lastIndexOf("-") >= 0) { if (this.systemDataList.git_hash.lastIndexOf("-") >= 0) {
this.systemDataList.git_hash = this.systemDataList.git_hash.substring(this.systemDataList.git_hash.lastIndexOf("-") + 2) this.systemDataList.git_hash = this.systemDataList.git_hash.substring(this.systemDataList.git_hash.lastIndexOf("-") + 2)
this.systemDataList.git_is_hash = true;
} }
const fetchUrl = "https://api.github.com/repos/tbnobody/OpenDTU/compare/" const fetchUrl = "https://api.github.com/repos/tbnobody/OpenDTU/compare/"

Binary file not shown.