Skip to content
This repository has been archived by the owner on Mar 4, 2021. It is now read-only.

Commit

Permalink
Added versioning to ci builds.
Browse files Browse the repository at this point in the history
  • Loading branch information
Christoph Amrein authored and Christoph Amrein committed Aug 29, 2016
1 parent bc37528 commit d13db6f
Show file tree
Hide file tree
Showing 9 changed files with 19 additions and 2 deletions.
1 change: 1 addition & 0 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ build:
pull: true
commands:
# Compilation
- EZ_VERSION=$CI_TAG
- if [ $$arch = 32 ]; then target=i686; fi
- if [ $$arch = 64 ]; then target=x86_64; fi
- pacman -S --needed --noconfirm --noprogressbar mingw-w64-${target}-pkg-config mingw-w64-${target}-qt5 zip
Expand Down
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ before_install:
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then source /opt/qt55/bin/qt55-env.sh ; fi

script:
- EZ_VERSION=$TRAVIS_TAG
- qmake -v
- qmake -config release EzGraver.pro
- make
Expand Down
2 changes: 2 additions & 0 deletions EzGraverCli/EzGraverCli.pro
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
include(../common.pri)

QT += core
QT += gui

Expand Down
9 changes: 7 additions & 2 deletions EzGraverCli/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ std::ostream& operator<<(std::ostream& rhv, QString const& lhv) {
void showHelp() {
std::cout << "Usage: EzGraverCli <option> [arguments...]\n\n";
std::cout << "Available options:\n";
std::cout << " a <port> - Shows the available ports\n";
std::cout << " v - Prints the version information\n";
std::cout << " a - Shows the available ports\n";
std::cout << " h <port> - Moves the engraver to the home position\n";
std::cout << " s <port> - Starts the engraving process with the burn time 60\n";
std::cout << " p <port> - Pauses the engraver\n";
Expand Down Expand Up @@ -60,9 +61,13 @@ void handleArguments(QStringList const& arguments) {
}

auto argument = arguments[1][0].toLatin1();
if(argument == 'a') {
switch(argument) {
case 'a':
showAvailablePorts();
return;
case 'v':
std::cout << "EzGraver " << EZ_VERSION << '\n';
return;
}

if(arguments.size() < 3) {
Expand Down
1 change: 1 addition & 0 deletions EzGraverLib/EzGraverLib.pro
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# Project created by QtCreator 2016-08-22T09:05:45
#
#-------------------------------------------------
include(../common.pri)

QT += gui
QT += serialport
Expand Down
3 changes: 3 additions & 0 deletions EzGraverUi/EzGraverUi.pro
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# Project created by QtCreator 2016-08-22T09:16:50
#
#-------------------------------------------------
include(../common.pri)

QT += core
QT += gui
Expand Down Expand Up @@ -30,3 +31,5 @@ else:unix: LIBS += -L$$OUT_PWD/../EzGraverLib/ -lEzGraverLib

INCLUDEPATH += $$PWD/../EzGraverLib
DEPENDPATH += $$PWD/../EzGraverLib

DISTFILES +=
2 changes: 2 additions & 0 deletions EzGraverUi/main.cpp
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
#include "mainwindow.h"
#include <QApplication>
#include <QString>

int main(int argc, char *argv[])
{
QApplication a(argc, argv);
MainWindow w;
w.show();
w.setWindowTitle(QString{"EzGraver %1"}.arg(EZ_VERSION));

return a.exec();
}
1 change: 1 addition & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ install:
- set PATH=%PATH%;%QT_DIR%\bin

before_build:
- set EZ_VERSION=%APPVEYOR_REPO_TAG_NAME%
- cd EzGraverCli & qmake -config release -tp vc -spec win32-msvc2015 EzGraverCli.pro & cd ..
- cd EzGraverLib & qmake -config release -tp vc -spec win32-msvc2015 EzGraverLib.pro & cd ..
- cd EzGraverUi & qmake -config release -tp vc -spec win32-msvc2015 EzGraverUi.pro & cd ..
Expand Down
1 change: 1 addition & 0 deletions common.pri
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
DEFINES += EZ_VERSION=\\\"$$(EZ_VERSION)\\\"

0 comments on commit d13db6f

Please sign in to comment.