Skip to content

Commit

Permalink
Merge pull request #15 from eplatonoff/feature/versioning
Browse files Browse the repository at this point in the history
Versioning
  • Loading branch information
sergeykuzmich authored Aug 5, 2020
2 parents e851a3a + f64e0bf commit 4f3f73f
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 4 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/pre-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ jobs:
run: |
export VERSION=${GITHUB_REF##*v}
sed -i '' 's/Version=[0-9]*\.[0-9]*\.[0-9]*/Version='"$VERSION"'/g' src/Pilorama.desktop
sed -i '' 's/VERSION=[0-9]*\.[0-9]*\.[0-9]*/VERSION='"$VERSION"'/g' src/Pilorama.pro
- name: Build Application
run: |
/usr/local/opt/qt/bin/qmake -config release src/Pilorama.pro
Expand Down Expand Up @@ -51,8 +52,7 @@ jobs:
export VERSION=${GITHUB_REF##*v}
sed -i 's/Version=[0-9]*\.[0-9]*\.[0-9]*/Version='"$VERSION"'/g' src/Pilorama.desktop
sed -i 's/#define MyAppVersion "[0-9]*\.[0-9]*\.[0-9]"/#define MyAppVersion "'"$VERSION"'"/g' wndws.iss
cat src/Pilorama.desktop
cat wndws.iss
sed -i 's/VERSION=[0-9]*\.[0-9]*\.[0-9]*/VERSION='"$VERSION"'/g' src/Pilorama.pro
- name: Build Application
shell: cmd
run: |
Expand Down Expand Up @@ -84,6 +84,7 @@ jobs:
export VERSION=${GITHUB_REF##*v}
sed -i 's/Version=[0-9]*\.[0-9]*\.[0-9]*/Version='"$VERSION"'/g' src/Pilorama.desktop
sed -i 's/#define MyAppVersion "[0-9]*\.[0-9]*\.[0-9]*"/#define MyAppVersion "'"$VERSION"'"/g' wndws.iss
sed -i 's/VERSION=[0-9]*\.[0-9]*\.[0-9]*/VERSION='"$VERSION"'/g' src/Pilorama.pro
- name: Commit Version
run: |
export VERSION=${GITHUB_REF##*v}
Expand Down
23 changes: 22 additions & 1 deletion src/Components/Preferences.qml
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ Item {

Text {
anchors.verticalCenter: parent.verticalCenter
textFormat: Text.RichText;
textFormat: Text.RichText
text: "<style>a:link { color: " + colors.getColor('mid') + "; }</style>" +
"<a href='https://github.com/eplatonoff/pilorama'>project on github</a>"

Expand All @@ -245,6 +245,27 @@ Item {
}
}

Row {
id: version
height: 32
anchors.horizontalCenter: parent.horizontalCenter
spacing: 3
anchors.bottom: parent.bottom
anchors.bottomMargin: 10

Text {
anchors.verticalCenter: parent.verticalCenter
textFormat: Text.RichText
text: "<style>a:link { color: " + colors.getColor('mid') + "; }</style>" +
"<a href='https://github.com/eplatonoff/pilorama/releases/latest/'>ver. " + Qt.application.version + "</a>"

font.family: localFont.name
font.pixelSize: preferences.infoFontSize

onLinkActivated: Qt.openUrlExternally(link)

}
}

}

Expand Down
3 changes: 3 additions & 0 deletions src/Pilorama.pro
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,6 @@ unix:
macx: target.path = /usr/local/bin
!android: target.path = /usr/bin
!isEmpty(target.path): INSTALLS += target

VERSION=9.9.9
DEFINES += APP_VERSION=\\\"$$VERSION\\\"
2 changes: 1 addition & 1 deletion src/TrayIcon.qml
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ SystemTrayIcon {
}
}
MenuItem {
text: qsTr("Settings")
text: qsTr("Preferences")
onTriggered: {
if (stack.currentItem === content) {
popUp()
Expand Down
2 changes: 2 additions & 0 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ int main(int argc, char *argv[])
app.setOrganizationDomain("somehumans.com");
app.setApplicationName("QML Timer");

app.setApplicationVersion(APP_VERSION);

QQmlApplicationEngine engine;
engine.addImageProvider("tray_icon_provider", new TrayImageProvider());

Expand Down

0 comments on commit 4f3f73f

Please sign in to comment.