Merge remote-tracking branch 'tbnobody/OpenDTU/master' into development
This commit is contained in:
commit
ef51d75f2c
48
.github/workflows/build.yml
vendored
48
.github/workflows/build.yml
vendored
@ -107,31 +107,43 @@ jobs:
|
|||||||
.pio/build/${{ matrix.environment }}/bootloader.bin
|
.pio/build/${{ matrix.environment }}/bootloader.bin
|
||||||
.pio/build/${{ matrix.environment }}/boot_app0.bin
|
.pio/build/${{ matrix.environment }}/boot_app0.bin
|
||||||
|
|
||||||
- uses: actions/upload-artifact@v3
|
|
||||||
if: startsWith(github.ref, 'refs/tags/')
|
|
||||||
with:
|
|
||||||
name: opendtu-release
|
|
||||||
path: |
|
|
||||||
.pio/build/${{ matrix.environment }}/opendtu-${{ matrix.environment }}.bin
|
|
||||||
.pio/build/${{ matrix.environment }}/partitions.bin
|
|
||||||
.pio/build/${{ matrix.environment }}/bootloader_dio_40m.bin
|
|
||||||
.pio/build/${{ matrix.environment }}/boot_app0.bin
|
|
||||||
|
|
||||||
release:
|
release:
|
||||||
name: Create Release
|
name: Create Release
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: [get_default_envs, build]
|
needs: [get_default_envs, build]
|
||||||
if: startsWith(github.ref, 'refs/tags/')
|
if: startsWith(github.ref, 'refs/tags/')
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/download-artifact@v3
|
- name: Checkout
|
||||||
with:
|
uses: actions/checkout@v3
|
||||||
name: opendtu-release
|
|
||||||
|
|
||||||
- name: Create draft release
|
- name: Build Changelog
|
||||||
uses: softprops/action-gh-release@v1
|
id: github_release
|
||||||
|
uses: mikepenz/release-changelog-builder-action@v3.7.0
|
||||||
with:
|
with:
|
||||||
draft: True
|
failOnError: true
|
||||||
files: |
|
commitMode: true
|
||||||
*.bin
|
configuration: ".github/workflows/config/release-notes-config.json"
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
- uses: actions/download-artifact@v3
|
||||||
|
with:
|
||||||
|
path: artifacts/
|
||||||
|
|
||||||
|
- name: Create ZIPs
|
||||||
|
run: |
|
||||||
|
ls -R
|
||||||
|
sudo apt install zip
|
||||||
|
cd artifacts
|
||||||
|
for i in */; do zip -r "${i%/}.zip" "$i"; done
|
||||||
|
for i in */; do cp ${i}opendtu-*.bin ./; done
|
||||||
|
|
||||||
|
- name: Create release
|
||||||
|
uses: softprops/action-gh-release@v1
|
||||||
|
with:
|
||||||
|
body: ${{steps.github_release.outputs.changelog}}
|
||||||
|
draft: False
|
||||||
|
files: |
|
||||||
|
artifacts/*.zip, artifacts/*.bin
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|||||||
44
.github/workflows/config/release-notes-config.json
vendored
Normal file
44
.github/workflows/config/release-notes-config.json
vendored
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
{
|
||||||
|
"categories": [
|
||||||
|
{
|
||||||
|
"title": "## ⚡ Breaking Changes",
|
||||||
|
"labels": [
|
||||||
|
"breaking change"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"title": "## 🚀 Features",
|
||||||
|
"labels": [
|
||||||
|
"feature"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"title": "## 🐛 Fixes",
|
||||||
|
"labels": [
|
||||||
|
"fix"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"title": "## 📚 Documentation",
|
||||||
|
"labels": [
|
||||||
|
"doc"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"title": "## 🛠 Under the hood",
|
||||||
|
"labels": []
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"template": "${{CHANGELOG}}",
|
||||||
|
"pr_template": "- [${{TITLE}}](https://github.com/tbnobody/OpenDTU/commit/${{MERGE_SHA}})",
|
||||||
|
"empty_template": "- no changes",
|
||||||
|
"label_extractor": [
|
||||||
|
{
|
||||||
|
"pattern": "(.): (.+)",
|
||||||
|
"target": "$1"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"tag_resolver": {
|
||||||
|
"method": "sort"
|
||||||
|
}
|
||||||
|
}
|
||||||
2
.github/workflows/cpplint.yml
vendored
2
.github/workflows/cpplint.yml
vendored
@ -18,4 +18,4 @@ jobs:
|
|||||||
pip install cpplint
|
pip install cpplint
|
||||||
- name: Linting
|
- name: Linting
|
||||||
run: |
|
run: |
|
||||||
cpplint --repository=. --recursive --filter=-runtime/references,-readability/braces,-whitespace,-legal,-build/include ./src ./include ./lib/Hoymiles
|
cpplint --repository=. --recursive --filter=-runtime/references,-readability/braces,-whitespace,-legal,-build/include ./src ./include ./lib/Hoymiles ./lib/MqttSubscribeParser ./lib/TimeoutHelper ./lib/ResetReason
|
||||||
|
|||||||
22
.github/workflows/yarnlint.yml
vendored
Normal file
22
.github/workflows/yarnlint.yml
vendored
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
name: Yarn Linting
|
||||||
|
|
||||||
|
on: [push, pull_request]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- name: Setup Node.js and yarn
|
||||||
|
uses: actions/setup-node@v3
|
||||||
|
with:
|
||||||
|
node-version: "18"
|
||||||
|
cache: "yarn"
|
||||||
|
cache-dependency-path: "webapp/yarn.lock"
|
||||||
|
|
||||||
|
- name: Install WebApp dependencies
|
||||||
|
run: yarn --cwd webapp install --frozen-lockfile
|
||||||
|
|
||||||
|
- name: Linting
|
||||||
|
run: yarn --cwd webapp lint
|
||||||
@ -17,6 +17,7 @@ This project is still under development and adds following features:
|
|||||||
|
|
||||||
[](https://github.com/tbnobody/OpenDTU/actions/workflows/build.yml)
|
[](https://github.com/tbnobody/OpenDTU/actions/workflows/build.yml)
|
||||||
[](https://github.com/tbnobody/OpenDTU/actions/workflows/cpplint.yml)
|
[](https://github.com/tbnobody/OpenDTU/actions/workflows/cpplint.yml)
|
||||||
|
[](https://github.com/tbnobody/OpenDTU/actions/workflows/yarnlint.yml)
|
||||||
|
|
||||||
## !! IMPORTANT UPGRADE NOTES !!
|
## !! IMPORTANT UPGRADE NOTES !!
|
||||||
|
|
||||||
|
|||||||
@ -96,7 +96,7 @@ build_flags = ${env.build_flags}
|
|||||||
-DOPENDTU_ETHERNET
|
-DOPENDTU_ETHERNET
|
||||||
|
|
||||||
|
|
||||||
[env:d1 mini esp32]
|
[env:d1_mini_esp32]
|
||||||
board = wemos_d1_mini32
|
board = wemos_d1_mini32
|
||||||
build_flags =
|
build_flags =
|
||||||
${env.build_flags}
|
${env.build_flags}
|
||||||
|
|||||||
@ -143,6 +143,7 @@ void setup()
|
|||||||
Configuration.write();
|
Configuration.write();
|
||||||
}
|
}
|
||||||
MessageOutput.println("done");
|
MessageOutput.println("done");
|
||||||
|
MessageOutput.println("done");
|
||||||
|
|
||||||
InverterSettings.init();
|
InverterSettings.init();
|
||||||
|
|
||||||
|
|||||||
@ -17,9 +17,9 @@
|
|||||||
</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?.substring(1)"
|
<td><a :href="'https://github.com/tbnobody/OpenDTU/commits/' + systemStatus.git_hash"
|
||||||
target="_blank" v-tooltip :title="$t('firmwareinfo.FirmwareVersionHint')">
|
target="_blank" v-tooltip :title="$t('firmwareinfo.FirmwareVersionHint')">
|
||||||
{{ systemStatus.git_hash?.substring(1) }}
|
{{ systemStatus.git_hash }}
|
||||||
</a></td>
|
</a></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
|||||||
@ -50,8 +50,16 @@ export default defineComponent({
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
getUpdateInfo() {
|
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;
|
||||||
|
|
||||||
|
// 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)
|
||||||
|
}
|
||||||
|
|
||||||
const fetchUrl = "https://api.github.com/repos/tbnobody/OpenDTU/compare/"
|
const fetchUrl = "https://api.github.com/repos/tbnobody/OpenDTU/compare/"
|
||||||
+ this.systemDataList.git_hash?.substring(1) + "...HEAD";
|
+ this.systemDataList.git_hash + "...HEAD";
|
||||||
|
|
||||||
fetch(fetchUrl)
|
fetch(fetchUrl)
|
||||||
.then((response) => {
|
.then((response) => {
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue
Block a user