diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 22609cc..d3f0905 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -60,18 +60,20 @@ package_debian: stage: packaging image: debian script: + - vers=$(grep -Po '"version":.*?[^\\]",' package.json | grep -Po '[0-9]+\.[0-9]+\.[0-9]+') # parse the version out of package .json - cd deb - mkdir -p "./OpenMediaCenter/var/www/openmediacenter/videos/" - mkdir -p "./OpenMediaCenter/tmp/" - cp -r ../build/* ./OpenMediaCenter/var/www/openmediacenter/ - cp -r ../api ./OpenMediaCenter/var/www/openmediacenter/ - cp ../database.sql ./OpenMediaCenter/tmp/openmediacenter.sql + - 'echo "Version: ${vers}" >> ./OpenMediaCenter/DEBIAN/control' - chmod -R 0775 * - dpkg-deb --build OpenMediaCenter - - mv OpenMediaCenter.deb OpenMediaCenter-0.1_amd64.deb + - mv OpenMediaCenter.deb OpenMediaCenter-${vers}_amd64.deb artifacts: paths: - - deb/OpenMediaCenter-0.1_amd64.deb + - deb/OpenMediaCenter-*.deb needs: ["build"] deploy_test1: diff --git a/deb/OpenMediaCenter/DEBIAN/control b/deb/OpenMediaCenter/DEBIAN/control index dd2c53f..25fdd59 100755 --- a/deb/OpenMediaCenter/DEBIAN/control +++ b/deb/OpenMediaCenter/DEBIAN/control @@ -1,5 +1,4 @@ Package: OpenMediaCenter -Version: 0.1 Depends: nginx, php-fpm, php-mysqli, mariadb-server Section: web Priority: optional diff --git a/package.json b/package.json index 5548084..2a435b2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "openmediacenter", - "version": "0.1.0", + "version": "0.1.1", "private": true, "dependencies": { "@fortawesome/fontawesome-svg-core": "^1.2.30", diff --git a/src/pages/SettingsPage/GeneralSettings.js b/src/pages/SettingsPage/GeneralSettings.js index 2ab51b7..dc0aca1 100644 --- a/src/pages/SettingsPage/GeneralSettings.js +++ b/src/pages/SettingsPage/GeneralSettings.js @@ -5,6 +5,7 @@ import GlobalInfos from '../../GlobalInfos'; import InfoHeaderItem from '../../elements/InfoHeaderItem/InfoHeaderItem'; import {faArchive, faBalanceScaleLeft, faRulerVertical} from '@fortawesome/free-solid-svg-icons'; import {faAddressCard} from '@fortawesome/free-regular-svg-icons'; +import {version} from '../../../package.json'; /** * Component for Generalsettings tag on Settingspage @@ -130,6 +131,9 @@ class GeneralSettings extends React.Component { +