Add generator meta with the current version

This commit is contained in:
Pierre Rudloff 2020-06-21 15:30:39 +02:00
parent ea2d0bf1d4
commit 251fbe48ca
4 changed files with 123 additions and 3 deletions

View file

@ -9,6 +9,8 @@ namespace Alltube;
use Alltube\Exception\ConfigException; use Alltube\Exception\ConfigException;
use Alltube\Library\Downloader; use Alltube\Library\Downloader;
use Jawira\CaseConverter\CaseConverterException; use Jawira\CaseConverter\CaseConverterException;
use Jean85\PrettyVersions;
use PackageVersions\Versions;
use Symfony\Component\ErrorHandler\Debug; use Symfony\Component\ErrorHandler\Debug;
use Symfony\Component\Yaml\Yaml; use Symfony\Component\Yaml\Yaml;
use Jawira\CaseConverter\Convert; use Jawira\CaseConverter\Convert;
@ -332,4 +334,14 @@ class Config
$this->avconvVerbosity $this->avconvVerbosity
); );
} }
/**
* @return string
*/
public function getAppVersion()
{
$version = PrettyVersions::getVersion(Versions::ROOT_PACKAGE_NAME);
return $version->getPrettyVersion();
}
} }

View file

@ -12,6 +12,7 @@
"barracudanetworks/archivestream-php": "^1.0", "barracudanetworks/archivestream-php": "^1.0",
"ffmpeg/ffmpeg": "^4.1", "ffmpeg/ffmpeg": "^4.1",
"jawira/case-converter": "^3.4", "jawira/case-converter": "^3.4",
"jean85/pretty-package-versions": "^1.3",
"mathmarques/smarty-view": "^1.1", "mathmarques/smarty-view": "^1.1",
"npm-asset/open-sans-fontface": "^1.4", "npm-asset/open-sans-fontface": "^1.4",
"rinvex/countries": "^6.1", "rinvex/countries": "^6.1",

108
composer.lock generated
View file

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically" "This file is @generated automatically"
], ],
"content-hash": "03b37b613f8ae3881395adf1cbc72b67", "content-hash": "4468e4da3c9a9626c997b0da8be455ae",
"packages": [ "packages": [
{ {
"name": "anam/phantomjs-linux-x86-binary", "name": "anam/phantomjs-linux-x86-binary",
@ -150,6 +150,61 @@
], ],
"time": "2018-08-10T13:58:33+00:00" "time": "2018-08-10T13:58:33+00:00"
}, },
{
"name": "composer/package-versions-deprecated",
"version": "1.8.1",
"source": {
"type": "git",
"url": "https://github.com/composer/package-versions-deprecated.git",
"reference": "b9805885293f3957ee0dd42616ac6915c4ac9a4b"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/composer/package-versions-deprecated/zipball/b9805885293f3957ee0dd42616ac6915c4ac9a4b",
"reference": "b9805885293f3957ee0dd42616ac6915c4ac9a4b",
"shasum": ""
},
"require": {
"composer-plugin-api": "^1.1.0 || ^2.0",
"php": "^7"
},
"replace": {
"ocramius/package-versions": "1.8.99"
},
"require-dev": {
"composer/composer": "^1.9.3 || ^2.0@dev",
"ext-zip": "^1.13",
"phpunit/phpunit": "^6.5 || ^7"
},
"type": "composer-plugin",
"extra": {
"class": "PackageVersions\\Installer",
"branch-alias": {
"dev-master": "1.x-dev"
}
},
"autoload": {
"psr-4": {
"PackageVersions\\": "src/PackageVersions"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Marco Pivetta",
"email": "ocramius@gmail.com"
},
{
"name": "Jordi Boggiano",
"email": "j.boggiano@seld.be"
}
],
"description": "Composer plugin that provides efficient querying for installed package versions (no runtime IO)",
"time": "2020-06-19T07:59:31+00:00"
},
{ {
"name": "ffmpeg/ffmpeg", "name": "ffmpeg/ffmpeg",
"version": "4.1.4", "version": "4.1.4",
@ -409,6 +464,57 @@
], ],
"time": "2019-12-15T14:31:43+00:00" "time": "2019-12-15T14:31:43+00:00"
}, },
{
"name": "jean85/pretty-package-versions",
"version": "1.3.0",
"source": {
"type": "git",
"url": "https://github.com/Jean85/pretty-package-versions.git",
"reference": "e3517fb11b67e798239354fe8213927d012ad8f9"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/Jean85/pretty-package-versions/zipball/e3517fb11b67e798239354fe8213927d012ad8f9",
"reference": "e3517fb11b67e798239354fe8213927d012ad8f9",
"shasum": ""
},
"require": {
"composer/package-versions-deprecated": "^1.8.0",
"php": "^7.0"
},
"require-dev": {
"phpunit/phpunit": "^6.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.x-dev"
}
},
"autoload": {
"psr-4": {
"Jean85\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Alessandro Lai",
"email": "alessandro.lai85@gmail.com"
}
],
"description": "A wrapper for ocramius/package-versions to get pretty versions strings",
"keywords": [
"composer",
"package",
"release",
"versions"
],
"time": "2020-04-24T14:19:45+00:00"
},
{ {
"name": "mathmarques/smarty-view", "name": "mathmarques/smarty-view",
"version": "1.1.2", "version": "1.1.2",

View file

@ -2,7 +2,7 @@
<html {if isset($locale)}lang="{$locale->getBcp47()}"{/if}> <html {if isset($locale)}lang="{$locale->getBcp47()}"{/if}>
<head> <head>
<meta charset="UTF-8"/> <meta charset="UTF-8"/>
<meta name=viewport content="width=device-width, initial-scale=1"> <meta name=viewport content="width=device-width, initial-scale=1"/>
{if isset($description)} {if isset($description)}
<meta name="description" content="{$description|escape}"/> <meta name="description" content="{$description|escape}"/>
<meta name="twitter:description" content="{$description|escape}"/> <meta name="twitter:description" content="{$description|escape}"/>
@ -19,7 +19,8 @@
<meta name="twitter:title" content="{$config->appName}{if isset($title)} - {$title|escape}{/if}"/> <meta name="twitter:title" content="{$config->appName}{if isset($title)} - {$title|escape}{/if}"/>
<meta name="twitter:image" content="{base_url}/img/logo.png"/> <meta name="twitter:image" content="{base_url}/img/logo.png"/>
<meta name="twitter:creator" content="@Tael67"/> <meta name="twitter:creator" content="@Tael67"/>
<meta name="theme-color" content="#4F4F4F"> <meta name="theme-color" content="#4F4F4F"/>
<link rel="manifest" href="{base_url}/resources/manifest.json"/> <link rel="manifest" href="{base_url}/resources/manifest.json"/>
<meta name="generator" content="AllTube Download ({$config->getAppVersion()})"/>
</head> </head>
<body class="{$class}"> <body class="{$class}">