diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 84959fbf..4fa430ea 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -52,6 +52,9 @@ jobs: steps: - uses: actions/checkout@v3 + - name: Get tags + run: git fetch --force --tags origin + - name: Cache pip uses: actions/cache@v3 with: diff --git a/platformio.ini b/platformio.ini index 328ce696..3d2f6161 100644 --- a/platformio.ini +++ b/platformio.ini @@ -27,10 +27,10 @@ build_unflags = lib_deps = 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 nrf24/RF24 @ ^1.4.5 - olikraus/U8g2 @ ^2.34.16 + olikraus/U8g2 @ ^2.34.17 buelowp/sunset @ ^1.1.7 https://github.com/coryjfowler/MCP_CAN_lib plerup/EspSoftwareSerial@^8.0.1 diff --git a/webapp/src/components/FirmwareInfo.vue b/webapp/src/components/FirmwareInfo.vue index 9eda8935..afc03cfd 100644 --- a/webapp/src/components/FirmwareInfo.vue +++ b/webapp/src/components/FirmwareInfo.vue @@ -17,7 +17,7 @@ {{ $t('firmwareinfo.FirmwareVersion') }} - {{ systemStatus.git_hash }} @@ -72,6 +72,12 @@ export default defineComponent({ 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; + } }, }); diff --git a/webapp/src/types/SystemStatus.ts b/webapp/src/types/SystemStatus.ts index 9e6728e5..6be634cd 100644 --- a/webapp/src/types/SystemStatus.ts +++ b/webapp/src/types/SystemStatus.ts @@ -9,6 +9,7 @@ export interface SystemStatus { sdkversion: string; config_version: string; git_hash: string; + git_is_hash: boolean; resetreason_0: string; resetreason_1: string; cfgsavecount: number; diff --git a/webapp/src/views/SystemInfoView.vue b/webapp/src/views/SystemInfoView.vue index d34d6ce7..fb73170a 100644 --- a/webapp/src/views/SystemInfoView.vue +++ b/webapp/src/views/SystemInfoView.vue @@ -51,11 +51,13 @@ export default defineComponent({ }, getUpdateInfo() { // 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" 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_is_hash = true; } const fetchUrl = "https://api.github.com/repos/tbnobody/OpenDTU/compare/" diff --git a/webapp_dist/js/app.js.gz b/webapp_dist/js/app.js.gz index 08d0f827..19652c3d 100644 Binary files a/webapp_dist/js/app.js.gz and b/webapp_dist/js/app.js.gz differ