Skip to content

Commit

Permalink
Merge pull request #6 from miikasda/devel
Browse files Browse the repository at this point in the history
Changes for next release
  • Loading branch information
miikasda authored Nov 21, 2023
2 parents 11bc16a + 5fe4337 commit cc5580a
Show file tree
Hide file tree
Showing 48 changed files with 1,698 additions and 318 deletions.
100 changes: 100 additions & 0 deletions .github/workflows/build-and-create-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
# This workflow is triggered when PR is merged to main branch
name: Build RPMs and create release if version has changed

env:
# Check latest version from https://github.com/CODeRUS/docker-sailfishos-platform-sdk
sfos_version: 4.5.0.16

on:
pull_request:
branches:
- main
types: [closed]

jobs:
version:
if: github.event.pull_request.merged == true
name: Check version
runs-on: ubuntu-22.04
outputs:
current_version: ${{ steps.current_version.outputs.current_version }}
latest_release: ${{ steps.latest_release.outputs.tag }}
steps:
- name: Checkout repo
id: checkout
uses: actions/checkout@v4
with:
fetch-depth: 0 # Required to get the latest tag
- name: Check current version
id: current_version
run: |
current_version=$(grep -E '^\s*Version\s*:' rpm/harbour-skruuvi.spec | awk '{print "v" $2}')
echo "current_version=$current_version" >> $GITHUB_OUTPUT
echo "Current version is $current_version"
- name: Check latest release version
id: latest_release
uses: "WyriHaximus/github-action-get-previous-tag@v1"
with:
fallback: ${{ steps.version.outputs.current_version }} # Use current version as fallback so no release is triggered

build:
if: github.event.pull_request.merged == true
name: Build
runs-on: ubuntu-22.04
steps:
- name: Checkout repo
id: checkout
uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: Initialize RPM building
id: init
run: docker pull coderus/sailfishos-platform-sdk:$sfos_version && mkdir RPMS
- name: Build aarch64
id: build_aarch64
uses: coderus/github-sfos-build@master
with:
release: ${{ env.sfos_version }}
arch: aarch64
- name: Build armv7hl
id: build_armv7hl
uses: coderus/github-sfos-build@master
with:
release: ${{ env.sfos_version }}
arch: armv7hl
- name: Build i486
uses: coderus/github-sfos-build@master
with:
release: ${{ env.sfos_version }}
arch: i486
- name: Upload build result
id: upload
uses: actions/upload-artifact@v3
with:
name: rpm-build-result
path: RPMS

release:
# Only create the release if the version in .spec is different than current tag
if: ${{ github.event.pull_request.merged == true && needs.version.outputs.current_version != needs.version.outputs.latest_release }}
needs: [version, build]
name: Release
runs-on: ubuntu-22.04
steps:
- name: Download RPMs
uses: actions/download-artifact@v3
with:
name: rpm-build-result
- name: Create a release
id: release
uses: softprops/action-gh-release@v1
with:
files: '*.rpm'
draft: false
prerelease: false
name: ${{needs.version.outputs.current_version}}
tag_name: ${{needs.version.outputs.current_version}}
fail_on_unmatched_files: true
generate_release_notes: true
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ The Chum community repository provides builds for unsupported architectures and

## Dependencies

Skruuvi uses internally [bleak](https://github.com/hbldh/bleak), [async-timeout](https://github.com/aio-libs/async-timeout) and [dbus-fast](https://github.com/Bluetooth-Devices/dbus-fast) to get history data from RuuviTags with Bluetooth. Data graph plots (GraphData.qml and Axis.qml) are slightly modified versions from [systemmonitor](https://github.com/custodian/harbour-systemmonitor).
Skruuvi uses internally [bleak](https://github.com/hbldh/bleak), [async-timeout](https://github.com/aio-libs/async-timeout) and [dbus-fast](https://github.com/Bluetooth-Devices/dbus-fast) to get history data from RuuviTags with Bluetooth. Data graph plots (GraphData.qml and Axis.qml) are slightly modified versions from [systemmonitor](https://github.com/custodian/harbour-systemmonitor), and about page has been done by using [Opal](https://github.com/Pretty-SFOS/opal-about).

## License

Expand All @@ -44,12 +44,12 @@ Skruuvi is licensed under GPL-3.0. License is provided [here](LICENSE).

To do list for Skruuvi is in the [wiki](https://github.com/miikasda/harbour-skruuvi/wiki/To-do-list). If you have a feature in mind which is not in the to do list, please open a [issue](https://github.com/miikasda/harbour-skruuvi/issues) with enhancement label.

## Local database location
## Local data location

The sensor readings are stored in local SQLite database. The database is located at `~/.local/share/org.malmi/harbour-skruuvi/ruuviData.sqlite`

For example if your username is defaultuser, the database can be pulled with rsync:
The sensor readings are stored in local SQLite database. The database is located at `~/.local/share/org.malmi/harbour-skruuvi/ruuviData.sqlite` . For example if your username is defaultuser, the database can be pulled with rsync:

```
rsync [email protected]:/home/defaultuser/.local/share/org.malmi/harbour-skruuvi/ruuviData.sqlite ./
```

The sensor readings can be exported as CSV from the data plot page. The resulting CSV is stored in `~/Documents/skruuvi-exports` folder.
2 changes: 1 addition & 1 deletion harbour-skruuvi.desktop
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ OrganizationName=org.malmi
# ApplicationName does not have to be identical to Name
ApplicationName=harbour-skruuvi
# Add the required permissions here
Permissions=Bluetooth
Permissions=Bluetooth;Documents
8 changes: 5 additions & 3 deletions harbour-skruuvi.pro
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,13 @@ SOURCES += src/harbour-skruuvi.cpp \

DISTFILES += qml/harbour-skruuvi.qml \
qml/cover/CoverPage.qml \
qml/pages/AboutPage.qml \
qml/pages/GetDataPage.qml \
qml/pages/GraphPage.qml \
qml/pages/SelectDevicePage.qml \
qml/pages/plotDataPage.qml \
qml/pages/GraphData.qml \
qml/pages/Axis.qml \
qml/pages/PlotDataPage.qml \
qml/modules/GraphData/GraphData.qml \
qml/modules/GraphData/Axis.qml \
rpm/harbour-skruuvi.changes.in \
rpm/harbour-skruuvi.changes.run.in \
rpm/harbour-skruuvi.spec \
Expand Down
22 changes: 11 additions & 11 deletions qml/pages/Axis.qml → qml/modules/GraphData/Axis.qml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import QtQuick 2.0

QtObject {
property int min: 0
property int max: 100

property string mask: "%1"
property string units: ""

property int grid: 1
}
import QtQuick 2.0

QtObject {
property int min: 0
property int max: 100

property string mask: "%1"
property string units: ""

property int grid: 1
}
Loading

0 comments on commit cc5580a

Please sign in to comment.