mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-01-31 12:49:34 +00:00
Meta.pm: use featurelevel attr options as major+minor version for fhem.pl
git-svn-id: https://svn.fhem.de/fhem/trunk@18663 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
6733966e50
commit
6ff65e16b2
@ -282,7 +282,7 @@ sub __GetMetadata {
|
|||||||
# $searchComments = 0;
|
# $searchComments = 0;
|
||||||
# }
|
# }
|
||||||
|
|
||||||
# extract VCS info from $Id$
|
# extract VCS info from $Id:
|
||||||
if ( !@vcs
|
if ( !@vcs
|
||||||
&& $l =~
|
&& $l =~
|
||||||
m/(\$Id\: ((?:([0-9]+)_)?([\w]+)\.([\w]+))\s([0-9]+)\s((([0-9]+)-([0-9]+)-([0-9]+))\s(([0-9]+):([0-9]+):([0-9]+)))(?:[\w]+?)\s([\w.-]+)\s\$)/
|
m/(\$Id\: ((?:([0-9]+)_)?([\w]+)\.([\w]+))\s([0-9]+)\s((([0-9]+)-([0-9]+)-([0-9]+))\s(([0-9]+):([0-9]+):([0-9]+)))(?:[\w]+?)\s([\w.-]+)\s\$)/
|
||||||
@ -499,34 +499,11 @@ m/(^#\s+Version:?\s+[^v\d]*(v?(?:\d{1,3}\.\d{1,3}(?:\.\d{1,3})?)))/i
|
|||||||
|
|
||||||
# Get some other info about fhem.pl
|
# Get some other info about fhem.pl
|
||||||
if ( $modMeta->{x_file}[2] eq 'fhem.pl' ) {
|
if ( $modMeta->{x_file}[2] eq 'fhem.pl' ) {
|
||||||
|
$versionFrom = 'attr/featurelevel+vcs';
|
||||||
# grep Makefile
|
$version = 'v' . $1 . '.' . $vcs[5]
|
||||||
if ( open( $fh, '<' . $modMeta->{x_file}[1] . 'Makefile' ) ) {
|
if ( $modules{'Global'}{AttrList} =~ m/\W*featurelevel:([^,]+)/ );
|
||||||
while ( my $l = <$fh> ) {
|
$modMeta->{version} = $version;
|
||||||
if ( $l =~ /(^VERS\s*=\s*(\d{1,3}\.\d{1,3})\s*)/i ) {
|
$modMeta->{x_version} = 'fhem.pl:' . $version;
|
||||||
my $extr = $2;
|
|
||||||
|
|
||||||
$versionFrom = 'Makefile+vcs';
|
|
||||||
$version =
|
|
||||||
( $extr =~ m/^v/i ? lc($extr) : lc( 'v' . $extr ) )
|
|
||||||
if ($extr);
|
|
||||||
|
|
||||||
if ($version) {
|
|
||||||
$version .= '.' . $vcs[5];
|
|
||||||
$modMeta->{version} = $version;
|
|
||||||
$modMeta->{x_version} =
|
|
||||||
$modMeta->{x_file}[2] . ':' . $version;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( $l =~ /(^DATE\s*=\s*(\d{4}-\d{2}-\d{2})\s*)/i ) {
|
|
||||||
$modMeta->{x_release_date} = $2 if ($2);
|
|
||||||
}
|
|
||||||
|
|
||||||
last if ( $version && $modMeta->{x_release_date} );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
close($fh);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
########
|
########
|
||||||
|
Loading…
Reference in New Issue
Block a user